@configuration(proxyBeanMethods = false)
时间:2020-05-08 00:35:42
收藏:0
阅读:1322
@configuration(proxyBeanMethods = false)
Specify whether {@code @Bean} methods should get proxied in order to enforce
bean lifecycle behavior, e.g. to return shared singleton bean instances even
in case of direct {@code @Bean} method calls in user code.
表明inter-bean references
和extenernal calls
是否能通过调用@Bean修饰的方法来获取到bean
如果不想通过调用方法来获取bean, 就可以设置proxyBeanMethods = false
效果就像
spring中factory-method
一样生成bean
原文:https://www.cnblogs.com/kikochz/p/12846702.html
评论(0)