mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-07 23:24:24 +08:00
Compare commits
3 Commits
1d5871c62f
...
e2868b4c44
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e2868b4c44 | ||
![]() |
ac6f06fb37 | ||
![]() |
4036788426 |
@@ -26,7 +26,6 @@ import cn.dev33.satoken.solon.util.SaSolonOperateUtil;
|
||||
import cn.dev33.satoken.strategy.SaAnnotationStrategy;
|
||||
import org.noear.solon.Solon;
|
||||
import org.noear.solon.core.handle.*;
|
||||
import org.noear.solon.core.route.RoutingTable;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@@ -161,10 +160,9 @@ public class SaTokenFilter implements SaFilter, Filter { //之所以改名,为
|
||||
if (mainHandler instanceof Gateway) {
|
||||
//支持网关处理
|
||||
Gateway gateway = (Gateway) mainHandler;
|
||||
RoutingTable<Handler> mainRouting = gateway.getMainRouting();
|
||||
MethodType method = MethodTypeUtil.valueOf(ctx.method());
|
||||
mainHandler = mainRouting.matchOne(ctx.pathNew(), method);
|
||||
mainHandler = gateway.find(ctx);
|
||||
}
|
||||
|
||||
Action action = (mainHandler instanceof Action ? (Action) mainHandler : null);
|
||||
|
||||
//1.执行前置处理(主要是一些跨域之类的)
|
||||
|
@@ -27,7 +27,6 @@ import cn.dev33.satoken.strategy.SaAnnotationStrategy;
|
||||
import org.noear.solon.core.handle.*;
|
||||
import org.noear.solon.core.route.RouterInterceptor;
|
||||
import org.noear.solon.core.route.RouterInterceptorChain;
|
||||
import org.noear.solon.core.route.RoutingTable;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@@ -197,9 +196,7 @@ public class SaTokenInterceptor implements SaFilter, RouterInterceptor {
|
||||
if (mainHandler instanceof Gateway) {
|
||||
//支持网关处理
|
||||
Gateway gateway = (Gateway) mainHandler;
|
||||
RoutingTable<Handler> mainRouting = gateway.getMainRouting();
|
||||
MethodType method = MethodTypeUtil.valueOf(ctx.method());
|
||||
mainHandler = mainRouting.matchOne(ctx.pathNew(), method);
|
||||
mainHandler = gateway.find(ctx);
|
||||
}
|
||||
|
||||
Action action = (mainHandler instanceof Action ? (Action) mainHandler : null);
|
||||
|
Reference in New Issue
Block a user