首页 > 其他 > 详细

@configuration(proxyBeanMethods = false)

时间:2020-05-08 00:35:42      阅读:1322      评论:0      收藏:0      [点我收藏+]

@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

@configuration(proxyBeanMethods = false)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!