@configuration(proxyBeanMethods = false)

@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

posted @ 2020-05-07 23:45  CyberPelican  阅读(5422)  评论(0编辑  收藏  举报