1、SpringBoot中加载bean,可以使用注解@compenent直接加载到applicationContext容器中

2、在直接类@Configuration中,手动注册bean,如:

spring Boot加载bean

 

相关文章: