CustomizedBeanDefinitionRegistryPostProcessor提示警告
来源:7-1 进攻refresh方法前必会知识之PostProcessor

慕虎9248598
2020-06-01
如果把CustomizedBeanDefinitionRegistryPostProcessor标记为@Configuration,会报如下警告。
信息: Cannot enhance @Configuration bean definition ‘customizedBeanDefinitionRegistryPostProcessor’ since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as ‘static’.
如果把标记改为@Component就不会有这个问题。
请问这个警告是为啥会出现?为什么看视频里您的环境没有提示这个警告?
写回答
1回答
-
慕虎9248598
提问者
2020-06-01
抱歉老师,看到一半就提问了,原来课程后边就讲了
10
相似问题