mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-09-18 17:48:03 +08:00
优化核心包代码注释 & 彩色日志打印
This commit is contained in:
@@ -7,7 +7,7 @@ import cn.dev33.satoken.SaManager;
|
||||
|
||||
/**
|
||||
* Sa-Token整合SpringBoot 示例
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.SaManager;
|
||||
|
||||
/**
|
||||
* Sa-Token整合SpringBoot 示例
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.SaManager;
|
||||
|
||||
/**
|
||||
* Sa-Token 示例
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 测试专用 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 账号封禁示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token Http Basic 认证
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 同端互斥登录示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 前后端分离模式示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 记住我模式登录
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 二级认证示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-16
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -15,7 +15,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 会话查询示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 密码加密示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 身份切换
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 注解鉴权示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-13
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -11,7 +11,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 权限认证示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-13
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -9,7 +9,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 权限认证示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-13
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token 登录认证示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-13
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* 为路由拦截鉴权准备的路示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-15
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -16,7 +16,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* Sa-Token Session会话示例
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-15
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 处理 404
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class NotFoundHandle implements ErrorController {
|
||||
|
@@ -5,7 +5,7 @@ import java.io.Serializable;
|
||||
/**
|
||||
* User 实体类
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-15
|
||||
*/
|
||||
public class SysUser implements Serializable {
|
||||
|
@@ -6,7 +6,7 @@ import cn.dev33.satoken.stp.SaLoginModel;
|
||||
/**
|
||||
* Sa-Token 自定义侦听器的实现
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-17
|
||||
*/
|
||||
//@Component // 打开此注解,让 SpringBoot 扫描到组件,即可完成自定义侦听器的注入
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.log.SaLog;
|
||||
/**
|
||||
* 将 Sa-Token log 信息转接到 Slf4j
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-11-2
|
||||
*/
|
||||
//@Component
|
||||
|
@@ -18,7 +18,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.stp.StpInterface;
|
||||
/**
|
||||
* 自定义权限认证接口扩展,Sa-Token 将从此实现类获取每个账号拥有的权限码
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-10-13
|
||||
*/
|
||||
@Component // 打开此注解,保证此类被springboot扫描,即可完成sa-token的自定义权限验证扩展
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.stp.StpLogic;
|
||||
|
||||
/**
|
||||
* Sa-Token 权限认证工具类 (User版)
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component
|
||||
public class StpUserUtil {
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
/**
|
||||
* 登录认证(User版):只有登录之后才能进入该方法
|
||||
* <p> 可标注在函数、类上(效果等同于标注在此类的所有方法上)
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SaCheckLogin(type = StpUserUtil.TYPE)
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.annotation.SaMode;
|
||||
/**
|
||||
* 权限认证(User版):必须具有指定权限才能进入该方法
|
||||
* <p> 可标注在函数、类上(效果等同于标注在此类的所有方法上)
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SaCheckPermission(type = StpUserUtil.TYPE)
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.annotation.SaMode;
|
||||
/**
|
||||
* 角色认证(User版):必须具有指定角色标识才能进入该方法
|
||||
* <p> 可标注在函数、类上(效果等同于标注在此类的所有方法上)
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SaCheckRole(type = StpUserUtil.TYPE)
|
||||
|
@@ -11,7 +11,7 @@ import cn.dev33.satoken.stp.StpLogic;
|
||||
|
||||
/**
|
||||
* Sa-Token 权限认证工具类 (User版)
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
public class StpUserUtil {
|
||||
|
||||
|
@@ -7,7 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
/**
|
||||
* Dubbo 服务消费端
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@EnableDubbo
|
||||
|
@@ -7,7 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
/**
|
||||
* Dubbo 服务提供端
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@EnableDubbo
|
||||
|
@@ -12,7 +12,7 @@ import cn.dev33.satoken.stp.StpLogic;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -16,7 +16,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 启动:Sa-OAuth2 ClientServer端
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class SaOAuth2ClientApplication {
|
||||
|
@@ -15,7 +15,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* Sa-OAuth2 Client端 控制器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class SaOAuthClientController {
|
||||
|
@@ -24,7 +24,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
* Map< String, Object> 是最常用的一种Map类型,但是它写着麻烦
|
||||
* <p>所以特封装此类,继承Map,进行一些扩展,可以让Map更灵活使用
|
||||
* <p>最新:2020-12-10 新增部分构造方法
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
public class SoMap extends LinkedHashMap<String, Object> {
|
||||
|
||||
|
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* 启动:Sa-OAuth2 Server端
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class SaOAuth2ServerApplication {
|
||||
|
@@ -19,7 +19,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* Sa-OAuth2 Server端 控制器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.oauth2.model.SaClientModel;
|
||||
|
||||
/**
|
||||
* Sa-Token OAuth2.0 整合实现
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component
|
||||
public class SaOAuth2TemplateImpl extends SaOAuth2Template {
|
||||
|
@@ -11,7 +11,7 @@ import cn.dev33.satoken.quick.SaQuickManager;
|
||||
|
||||
/**
|
||||
* springboot启动之后
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaTokenConsts;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -11,7 +11,7 @@ import cn.dev33.satoken.util.StrFormatter;
|
||||
/**
|
||||
* 将 Sa-Token log 信息转接到 Solon
|
||||
*
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @since 2022-11-2
|
||||
*/
|
||||
//@Component
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.context.SaHolder;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @author noear
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -10,7 +10,7 @@ import org.noear.solon.annotation.Param;
|
||||
|
||||
/**
|
||||
* 测试: 同域单点登录
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -20,7 +20,7 @@ import org.noear.solon.annotation.Param;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -6,7 +6,7 @@ import org.noear.solon.annotation.Mapping;
|
||||
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
* @author noear
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -3,7 +3,7 @@ package com.pj.util;
|
||||
|
||||
/**
|
||||
* 用于测试用时
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
public class Ttime {
|
||||
|
@@ -5,8 +5,8 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Sa-Token整合SpringBoot 示例,整合redis
|
||||
* @author kong
|
||||
* Sa-Token整合SpringBoot 示例,整合redis
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 处理 404
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class NotFoundHandle implements ErrorController {
|
||||
|
@@ -12,7 +12,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 注解鉴权测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -3,7 +3,7 @@ package com.pj.util;
|
||||
|
||||
/**
|
||||
* 用于测试用时
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
public class Ttime {
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.SaManager;
|
||||
|
||||
/**
|
||||
* Sa-Token整合SpringBoot 示例,整合redis
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 处理 404
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class NotFoundHandle implements ErrorController {
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 注解鉴权测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -3,7 +3,7 @@ package com.pj.util;
|
||||
|
||||
/**
|
||||
* 用于测试用时
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
public class Ttime {
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.SaManager;
|
||||
|
||||
/**
|
||||
* Sa-Token整合SpringBoot 示例
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 处理 404
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class NotFoundHandle implements ErrorController {
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 注解鉴权测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -22,7 +22,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -3,7 +3,7 @@ package com.pj.util;
|
||||
|
||||
/**
|
||||
* 用于测试用时
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
public class Ttime {
|
||||
|
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Sa-Token 整合 SpringBoot3 示例,整合redis
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -12,7 +12,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 处理 404
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class NotFoundHandle implements ErrorController {
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* [Sa-Token 权限认证] 配置类
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
|
@@ -14,7 +14,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 注解鉴权测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -8,7 +8,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 登录测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 压力测试
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 测试专用Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -3,7 +3,7 @@ package com.pj.util;
|
||||
|
||||
/**
|
||||
* 用于测试用时
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
public class Ttime {
|
||||
|
@@ -8,7 +8,7 @@ import org.noear.solon.core.handle.FilterChain;
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component(index = -200)
|
||||
public class CorsFilter implements Filter {
|
||||
|
@@ -14,7 +14,7 @@ import org.noear.solon.core.handle.Render;
|
||||
/**
|
||||
* 前后台分离架构下集成SSO所需的代码 (SSO-Server端)
|
||||
* <p>(注:如果不需要前后端分离架构下集成SSO,可删除此包下所有代码)</p>
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -9,7 +9,7 @@ import org.noear.solon.core.handle.FilterChain;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
|
@@ -7,7 +7,7 @@ import org.noear.solon.annotation.Mapping;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Server端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -6,7 +6,7 @@ import org.noear.solon.annotation.SolonMain;
|
||||
|
||||
/**
|
||||
* SSO模式一,Client端 Demo
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SolonMain
|
||||
|
@@ -12,7 +12,7 @@ import org.noear.solon.core.handle.Render;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Client端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Controller
|
||||
public class SsoClientController implements Render {
|
||||
|
@@ -8,7 +8,7 @@ import org.noear.solon.core.handle.FilterChain;
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component(index = -200)
|
||||
public class CorsFilter implements Filter {
|
||||
|
@@ -12,7 +12,7 @@ import org.noear.solon.core.handle.Render;
|
||||
/**
|
||||
* 前后台分离架构下集成SSO所需的代码 (SSO-Client端)
|
||||
* <p>(注:如果不需要前后端分离架构下集成SSO,可删除此包下所有代码)</p>
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
|
@@ -13,7 +13,7 @@ import org.noear.solon.core.handle.Render;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Client端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Controller
|
||||
public class SsoClientController implements Render {
|
||||
|
@@ -13,7 +13,7 @@ import org.noear.solon.core.handle.Render;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Client端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Controller
|
||||
public class SsoClientController implements Render {
|
||||
|
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component
|
||||
@Order(-200)
|
||||
|
@@ -13,7 +13,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
/**
|
||||
* 前后台分离架构下集成SSO所需的代码 (SSO-Server端)
|
||||
* <p>(注:如果不需要前后端分离架构下集成SSO,可删除此包下所有代码)</p>
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -7,7 +7,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* 全局异常处理
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
|
@@ -14,7 +14,7 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Server端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@RestController
|
||||
|
@@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* SSO模式一,Client端 Demo
|
||||
* @author kong
|
||||
* @author click33
|
||||
*
|
||||
*/
|
||||
@SpringBootApplication
|
||||
|
@@ -10,7 +10,7 @@ import cn.dev33.satoken.util.SaResult;
|
||||
|
||||
/**
|
||||
* Sa-Token-SSO Client端 Controller
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@RestController
|
||||
public class SsoClientController {
|
||||
|
@@ -16,7 +16,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
* @author kong
|
||||
* @author click33
|
||||
*/
|
||||
@Component
|
||||
@Order(-200)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user