mirror of
https://gitee.com/dromara/sa-token.git
synced 2024-12-01 19:37:42 +08:00
solon 升为 3.0.1
This commit is contained in:
parent
a4b63f5875
commit
d3d11ce2b9
@ -40,13 +40,15 @@ public class Config {
|
||||
|
||||
@Bean
|
||||
public void saTokenPathInterceptor2() {
|
||||
Solon.app().before((ctx) -> {
|
||||
Solon.app().routerInterceptor((ctx, mainHandler, chain) -> {
|
||||
SaRouter.match("/**", StpUtil::checkLogin);
|
||||
// 根据路由划分模块,不同模块不同鉴权
|
||||
SaRouter.match("/user/**", r -> StpUtil.checkPermission("user"));
|
||||
SaRouter.match("/admin/**", r -> StpUtil.checkPermission("admin"));
|
||||
SaRouter.match("/goods/**", r -> StpUtil.checkPermission("goods"));
|
||||
SaRouter.match("/orders/**", r -> StpUtil.checkPermission("orders"));
|
||||
|
||||
chain.doIntercept(ctx, mainHandler);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user