@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 referencesextenernal calls是否能通过调用@Bean修饰的方法来获取到bean

如果不想通过调用方法来获取bean, 就可以设置proxyBeanMethods = false 效果就像

spring中factory-method 一样生成bean

原文:https://www.cnblogs.com/kikochz/p/12846702.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!