mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-26 02:29:01 +08:00
将 Autowired 更换为更合适的 PostConstruct
This commit is contained in:
@@ -89,7 +89,7 @@ public String info() {
|
||||
``` java
|
||||
@Configuration
|
||||
public class SaTokenConfigure {
|
||||
@Autowired
|
||||
@PostConstruct
|
||||
public void rewriteSaStrategy() {
|
||||
// 重写Sa-Token的注解处理器,增加注解合并功能
|
||||
SaStrategy.instance.getAnnotation = (element, annotationClass) -> {
|
||||
@@ -167,7 +167,7 @@ public class StpUserUtil {
|
||||
@Configuration
|
||||
public class SaTokenConfigure {
|
||||
|
||||
@Autowired
|
||||
@PostConstruct
|
||||
public void setSaTokenConfig() {
|
||||
// 设定 StpUtil 使用的 SaTokenConfig 配置参数对象
|
||||
SaTokenConfig config1 = new SaTokenConfig();
|
||||
|
||||
Reference in New Issue
Block a user