源码学习——bean注入

spring boot有很多方式让我们注入bean,最常用有:

1、通过注解方式,如@component、@Service等

2、在配置类内使用@Bean

下面是其它注入bean的方式及其源码解读

例如,多数据源切换通过实现ImportBeanDefinitionRegistrar来注入数据源bean,具体待补充








你可能感兴趣的:(Spring,Boot,与,Spring,Cloud)