v1.15.0.RELEASE 发布

This commit is contained in:
shengzhang
2021-03-24 01:44:19 +08:00
parent a8117a8021
commit 921e693e7e
25 changed files with 52 additions and 34 deletions

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-parent</artifactId>
<version>1.15.0</version>
<version>1.15.0.RELEASE</version>
</parent>
<packaging>jar</packaging>

View File

@@ -15,13 +15,19 @@ import cn.dev33.satoken.stp.StpUtil;
public class SaRouteInterceptor implements HandlerInterceptor {
/**
* 自定义模式下的执行函数
* 每次进入拦截器的[执行函数]
*/
public SaRouteFunction function;
/**
* 创建 (默认为自定义认证)
* @param function 自定义模式下的执行函数
* 创建一个路由拦截器
*/
public SaRouteInterceptor() {
}
/**
* 创建, 并指定[执行函数]
* @param function [执行函数]
*/
public SaRouteInterceptor(SaRouteFunction function) {
this.function = function;
@@ -50,6 +56,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
if(function == null) {
StpUtil.checkLogin();
} else {
// 否则执行函数
function.run(request, response, handler);
}