Bean后置处理器 – SmartInstantiationAwareBeanPostProcessor#getEarlyBeanReference
示例
@Component public class IndexA { @Autowired IndexB bbb; public IndexA() { System.out.println("IndexA constructor..."); } public void printf(){ System.out.println("indexA printf : "); System.out.println("indexB --> " + (bbb == null ? null : bbb.getClass().getName())); } } @Component public class IndexB { @Autowired IndexA aaa; public IndexB() { System.out.println("IndexB constructor..."); } public void printf(){ System.out.println("indexB printf : "); System.out.println("indexA --> " + (aaa == null ? null : aaa.getClass().getName())); } } @Configuration @ComponentScan({ "com.study.ioc.cyc" }) public class StartConfig { }
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » Bean后置处理器 – SmartInstantiationAwareBeanPostProcessor#getEarlyBeanReference
自学咖网 » Bean后置处理器 – SmartInstantiationAwareBeanPostProcessor#getEarlyBeanReference