mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-09-19 10:08:07 +08:00
添加solon适配及demo
This commit is contained in:
@@ -12,7 +12,7 @@ import org.noear.solon.annotation.Configuration;
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
*
|
||||
* @author noear
|
||||
*/
|
||||
@Configuration
|
||||
public class SaTokenConfigure {
|
||||
|
@@ -10,7 +10,7 @@ import org.noear.solon.annotation.Component;
|
||||
/**
|
||||
* 自定义权限验证接口扩展
|
||||
*/
|
||||
@Component // 打开此注解,保证此类被springboot扫描,即可完成sa-token的自定义权限验证扩展
|
||||
@Component // 打开此注解,保证此类被 solon 扫描,即可完成 sa-token 的自定义权限验证扩展
|
||||
public class StpInterfaceImpl implements StpInterface {
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,8 @@ import org.noear.solon.core.handle.Context;
|
||||
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
* 全局异常处理
|
||||
* @author noear
|
||||
*/
|
||||
@Component
|
||||
public class GlobalException implements EventListener<Exception> {
|
||||
|
@@ -11,6 +11,7 @@ import org.noear.solon.annotation.Param;
|
||||
/**
|
||||
* 测试: 同域单点登录
|
||||
* @author kong
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
@Mapping("/sso/")
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
*
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
@Mapping("/s-test/")
|
||||
|
@@ -21,7 +21,7 @@ import org.noear.solon.annotation.Param;
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
*
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
@Mapping("/test/")
|
||||
|
@@ -7,7 +7,7 @@ import org.noear.solon.annotation.Mapping;
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
*
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
@Mapping("/user/")
|
||||
|
Reference in New Issue
Block a user