mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
优化 sa-token-spring-boot-autoconfig 模块注释
This commit is contained in:
parent
facb7ca9b6
commit
ff77c210df
@ -1,4 +1,4 @@
|
||||
/**
|
||||
* sa-token集成SpringBoot的各个组件
|
||||
* Sa-Token 集成 SpringBoot 的各个组件
|
||||
*/
|
||||
package cn.dev33.satoken;
|
@ -25,10 +25,10 @@ import cn.dev33.satoken.stp.StpUtil;
|
||||
import cn.dev33.satoken.temp.SaTempInterface;
|
||||
|
||||
/**
|
||||
* 注入Sa-Token所需要的Bean
|
||||
* 注入 Sa-Token 所需要的 Bean
|
||||
*
|
||||
* @author click33
|
||||
*
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
public class SaBeanInject {
|
||||
|
||||
@ -36,6 +36,7 @@ public class SaBeanInject {
|
||||
* 组件注入
|
||||
* <p> 为确保 Log 组件正常打印,必须将 SaLog 和 SaTokenConfig 率先初始化 </p>
|
||||
*
|
||||
* @param log log 对象
|
||||
* @param saTokenConfig 配置对象
|
||||
*/
|
||||
public SaBeanInject(
|
||||
|
@ -4,9 +4,10 @@ import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.util.PathMatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author click33
|
||||
* 持有 PathMatcher 全局引用,方便快捷的调用 PathMatcher 相关方法
|
||||
*
|
||||
* @author click33
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
public class SaPathMatcherHolder {
|
||||
|
||||
|
@ -1,19 +1,18 @@
|
||||
package cn.dev33.satoken.spring.json;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import cn.dev33.satoken.error.SaSpringBootErrorCode;
|
||||
import cn.dev33.satoken.exception.SaJsonConvertException;
|
||||
import cn.dev33.satoken.json.SaJsonTemplate;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* JSON 转换器, Jackson 版实现
|
||||
*
|
||||
* @author click33
|
||||
* @since: 2022-4-26
|
||||
* @since 2022-4-26
|
||||
*/
|
||||
public class SaJsonTemplateForJackson implements SaJsonTemplate {
|
||||
|
||||
@ -23,10 +22,7 @@ public class SaJsonTemplateForJackson implements SaJsonTemplate {
|
||||
public ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 将任意对象转换为 json 字符串
|
||||
*
|
||||
* @param obj 对象
|
||||
* @return 转换后的 json 字符串
|
||||
* 将任意对象转换为 json 字符串
|
||||
*/
|
||||
@Override
|
||||
public String toJsonString(Object obj) {
|
||||
|
@ -9,16 +9,16 @@ import cn.dev33.satoken.oauth2.logic.SaOAuth2Template;
|
||||
import cn.dev33.satoken.oauth2.logic.SaOAuth2Util;
|
||||
|
||||
/**
|
||||
* 注入 Sa-Token-OAuth2 所需要的Bean
|
||||
* 注入 Sa-Token-OAuth2 所需要的组件
|
||||
*
|
||||
* @author click33
|
||||
*
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
@ConditionalOnClass(SaOAuth2Manager.class)
|
||||
public class SaOAuth2BeanInject {
|
||||
|
||||
/**
|
||||
* 注入OAuth2配置Bean
|
||||
* 注入 OAuth2 配置对象
|
||||
*
|
||||
* @param saOAuth2Config 配置对象
|
||||
*/
|
||||
@ -28,9 +28,9 @@ public class SaOAuth2BeanInject {
|
||||
}
|
||||
|
||||
/**
|
||||
* 注入代码模板Bean
|
||||
* 注入 OAuth2 模板代码类
|
||||
*
|
||||
* @param saOAuth2Template 代码模板Bean
|
||||
* @param saOAuth2Template 模板代码类
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
public void setSaOAuth2Interface(SaOAuth2Template saOAuth2Template) {
|
||||
|
@ -1,22 +1,23 @@
|
||||
package cn.dev33.satoken.spring.oauth2;
|
||||
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
|
||||
|
||||
/**
|
||||
* 注册 Sa-Token-OAuth2 所需要的Bean
|
||||
* @author click33
|
||||
* 注册 Sa-Token-OAuth2 所需要的Bean
|
||||
*
|
||||
* @author click33
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
@ConditionalOnClass(SaOAuth2Manager.class)
|
||||
public class SaOAuth2BeanRegister {
|
||||
|
||||
/**
|
||||
* 获取OAuth2配置Bean
|
||||
* 获取 OAuth2 配置对象
|
||||
*
|
||||
* @return 配置对象
|
||||
*/
|
||||
@Bean
|
||||
|
@ -10,16 +10,16 @@ import cn.dev33.satoken.sso.SaSsoTemplate;
|
||||
import cn.dev33.satoken.sso.SaSsoUtil;
|
||||
|
||||
/**
|
||||
* 注入 Sa-Token-SSO 所需要的Bean
|
||||
* 注入 Sa-Token-SSO 所需要的 Bean
|
||||
*
|
||||
* @author click33
|
||||
*
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
@ConditionalOnClass(SaSsoManager.class)
|
||||
public class SaSsoBeanInject {
|
||||
|
||||
/**
|
||||
* 注入 Sa-Token-SSO 配置Bean
|
||||
* 注入 Sa-Token-SSO 配置类
|
||||
*
|
||||
* @param saSsoConfig 配置对象
|
||||
*/
|
||||
@ -29,9 +29,9 @@ public class SaSsoBeanInject {
|
||||
}
|
||||
|
||||
/**
|
||||
* 注入 Sa-Token-SSO 单点登录模块 Bean
|
||||
* 注入 SSO 模板代码类
|
||||
*
|
||||
* @param ssoTemplate saSsoTemplate对象
|
||||
* @param ssoTemplate SaSsoTemplate 对象
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
public void setSaSsoTemplate(SaSsoTemplate ssoTemplate) {
|
||||
|
@ -8,15 +8,16 @@ import cn.dev33.satoken.config.SaSsoConfig;
|
||||
import cn.dev33.satoken.sso.SaSsoManager;
|
||||
|
||||
/**
|
||||
* 注册 Sa-Token-SSO 所需要的Bean
|
||||
* @author click33
|
||||
* 注册 Sa-Token-SSO 所需要的 Bean
|
||||
*
|
||||
* @author click33
|
||||
* @since <= 1.34.0
|
||||
*/
|
||||
@ConditionalOnClass(SaSsoManager.class)
|
||||
public class SaSsoBeanRegister {
|
||||
|
||||
/**
|
||||
* 获取 SSO 配置Bean
|
||||
* 获取 SSO 配置对象
|
||||
* @return 配置对象
|
||||
*/
|
||||
@Bean
|
||||
|
Loading…
Reference in New Issue
Block a user