摘要: Enable特性: @Import(Xxxx.class)//关键点,使用Import注解,再回调。Xxxx.class是一个配置类 Xxxx implements ImportSelector selectImports //把我们传入的类数组进行装配 Xxx implenments Import 阅读全文
posted @ 2019-11-08 16:48 不吃沙琪玛 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1)@Bean 2)@Component 3)@Import方式 (1)第一种,直接装配,可用逗号隔开添加多个 (2)第二种,可集中管理,也可以将String数组中的数据放在配置文件中。 (3)第三种,可以带入一些参数 阅读全文
posted @ 2019-11-08 16:48 不吃沙琪玛 阅读(2849) 评论(0) 推荐(0) 编辑