@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是同一个.

原文地址:https://www.cnblogs.com/kikochz/p/12872055.html