@Configuration 和 @Component 的区别, 以及lite mode

Instead,when one {@code @Bean}-method invokes another {@code @Bean}-method in lite

mode, the invocation is a standard Java method invocation; Spring does not interceptthe invocation via a CGLIB proxy.

如果@Component下使用@Bean, 并通过调用方法来获取JavaBean, 那么每次获取到都是新的JavaBean, 不是单例生产的JavaBean, 这种模式就是lite mode, @Configuration是同一个.

posted @ 2020-05-11 21:31  CyberPelican  阅读(434)  评论(0编辑  收藏  举报