调整 sa-token-demo-solon,使用 SaTokenInterceptor 替代之前的 SaTokenPathInterceptor(旧的标为弃用)

This commit is contained in:
noear 2023-01-13 09:11:23 +08:00
parent 1e87426481
commit 9b9de79245

View File

@ -22,9 +22,9 @@ public class SaTokenConfigure {
/**
* 注册 [sa-token全局过滤器]
*/
@Bean
public void tokenPathFilter() {
Solon.app().before(new SaTokenPathInterceptor()
@Bean(index = -100)
public SaTokenInterceptor tokenPathFilter() {
return new SaTokenInterceptor()
// 指定 [拦截路由] [放行路由]
.addInclude("/**").addExclude("/favicon.ico")
@ -55,7 +55,6 @@ public class SaTokenConfigure {
// 禁用浏览器内容嗅探
.setHeader("X-Content-Type-Options", "nosniff")
;
})
);
});
}
}