新增身份临时切换功能

This commit is contained in:
shengzhang
2021-01-11 23:10:11 +08:00
parent c7f3b6d493
commit 4bfad95bad
10 changed files with 219 additions and 53 deletions

View File

@@ -8,7 +8,7 @@ import javax.servlet.http.HttpServletResponse;
* @author kong
*
*/
public interface SaFunction {
public interface SaRouteFunction {
/**
* 执行验证的方法

View File

@@ -41,7 +41,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
/**
* 自定义模式下的执行函数
*/
private SaFunction function;
private SaRouteFunction function;
/**
@@ -131,14 +131,14 @@ public class SaRouteInterceptor implements HandlerInterceptor {
/**
* @return 自定义模式下的执行函数
*/
public SaFunction getFunction() {
public SaRouteFunction getFunction() {
return function;
}
/**
* @param function 设置自定义模式下的执行函数
*/
public SaRouteInterceptor setFunction(SaFunction function) {
public SaRouteInterceptor setFunction(SaRouteFunction function) {
this.type = SaRouteInterceptor.CUSTOM;
this.function = function;
return this;
@@ -171,7 +171,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
* 创建 (默认为自定义认证)
* @param function 自定义模式下的执行函数
*/
public SaRouteInterceptor(SaFunction function) {
public SaRouteInterceptor(SaRouteFunction function) {
this(SaRouteInterceptor.CUSTOM, null, new String[0]);
setFunction(function);
}
@@ -207,7 +207,7 @@ public class SaRouteInterceptor implements HandlerInterceptor {
* @param function 自定义模式下的执行函数
* @return sa拦截器
*/
public static SaRouteInterceptor createCustomVal(SaFunction function) {
public static SaRouteInterceptor createCustomVal(SaRouteFunction function) {
return new SaRouteInterceptor(function);
}