优化bean无法被所有beanpostprocessor处理

pull/8125/head
EightMonth 2025-04-30 10:00:02 +08:00
parent 309c76d268
commit 888a032266
3 changed files with 8 additions and 0 deletions

View File

@ -1,7 +1,10 @@
package org.jeecg.config; package org.jeecg.config;
import org.jeecg.config.vo.*; import org.jeecg.config.vo.*;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Role;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -11,6 +14,7 @@ import org.springframework.stereotype.Component;
*/ */
@Component("jeecgBaseConfig") @Component("jeecgBaseConfig")
@ConfigurationProperties(prefix = "jeecg") @ConfigurationProperties(prefix = "jeecg")
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class JeecgBaseConfig { public class JeecgBaseConfig {
/** /**
* () * ()

View File

@ -46,6 +46,7 @@ import java.util.*;
@Slf4j @Slf4j
@Configuration @Configuration
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class ShiroConfig { public class ShiroConfig {
@Resource @Resource

View File

@ -20,7 +20,9 @@ import org.jeecg.common.util.SpringContextUtils;
import org.jeecg.common.util.TokenUtils; import org.jeecg.common.util.TokenUtils;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.mybatis.MybatisPlusSaasConfig; import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Role;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
@ -35,6 +37,7 @@ import java.util.Set;
*/ */
@Component @Component
@Slf4j @Slf4j
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class ShiroRealm extends AuthorizingRealm { public class ShiroRealm extends AuthorizingRealm {
@Lazy @Lazy
@Resource @Resource