1、SpringBoot中加载bean,可以使用注解@compenent直接加载到applicationContext容器中
2、在直接类@Configuration中,手动注册bean,如:
spring Boot加载bean
原文:https://www.cnblogs.com/javabg/p/10704566.html