sa-token-solon-plugin:将示例的 SaTokenPathFilter 改用 SaTokenPathInterceptor

This commit is contained in:
noear 2022-09-28 18:23:47 +08:00
parent 05a9d40151
commit 67e4c0af75

View File

@ -21,8 +21,8 @@ public class SaTokenConfigure {
* 注册 [sa-token全局过滤器]
*/
@Bean
public SaTokenPathFilter tokenPathFilter() {
return new SaTokenPathFilter()
public void tokenPathFilter() {
Solon.app().before(new SaTokenPathInterceptor()
// 指定 [拦截路由] [放行路由]
.addInclude("/**").addExclude("/favicon.ico")
@ -54,7 +54,6 @@ public class SaTokenConfigure {
.setHeader("X-Content-Type-Options", "nosniff")
;
})
;
);
}
}