spring Boot加载bean

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

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

 

posted @ 2019-04-14 12:02  关键步就几步  阅读(3611)  评论(0编辑  收藏  举报