mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-12-26 22:25:39 +08:00
增强 SaRouter 链式匹配能力
This commit is contained in:
@@ -161,7 +161,7 @@ public class SaReactorFilter implements WebFilter {
|
||||
SaReactorSyncHolder.setContext(exchange);
|
||||
|
||||
// 执行全局过滤器
|
||||
SaRouter.match(includeList, excludeList, () -> {
|
||||
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
|
||||
beforeAuth.run(null);
|
||||
auth.run(null);
|
||||
});
|
||||
|
||||
@@ -143,11 +143,11 @@ public class SaTokenPathFilter implements Filter {
|
||||
public void doFilter(Context ctx, FilterChain chain) throws Throwable {
|
||||
try {
|
||||
// 执行全局过滤器
|
||||
SaRouter.match(includeList, excludeList, () -> {
|
||||
beforeAuth.run(null);
|
||||
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
|
||||
beforeAuth.run(null);
|
||||
auth.run(null);
|
||||
});
|
||||
|
||||
|
||||
} catch (StopMatchException e) {
|
||||
|
||||
} catch (Throwable e) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SaResponseForSolon implements SaResponse {
|
||||
|
||||
@Override
|
||||
public SaResponse setStatus(int sc) {
|
||||
ctx.statusSet(sc);
|
||||
ctx.status(sc);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public class SaServletFilter implements Filter {
|
||||
|
||||
try {
|
||||
// 执行全局过滤器
|
||||
SaRouter.match(includeList, excludeList, () -> {
|
||||
SaRouter.match(includeList).notMatch(excludeList).check(r -> {
|
||||
beforeAuth.run(null);
|
||||
auth.run(null);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user