3、原则上需要被定义到 spring.factories 中的配置类是不需要写 @Configuration 注解的,如果要写 @Configuration 注解,也肯定是 @Configuration(proxyBeanMethods = false),如果这里你不清楚 proxyBeanMethods = false 的作用,可以移步查看文章《Srpign @Configuration proxyBeanMethods=fa...
2、spring.factories 里不要添加 Test1Config、Test2Config、Test3Config 3、运行程序,此时如果你能看到构造方法的输出(正常来说输出打印的内容也不会是 123 的顺序),能输出内容就是不应该的。因为在自定义 starter 的时候,我们的(Test1Config、Test2Config、Test3Config )肯定是要通过配置到 spring.factories 中来被...