摘要: 条件装配:满足Conditional指定的条件,则进行组件注入 @Configuration//告诉springboot这是一个配置类 public class MyConfig { @Bean("tom") public Stu stu01(){ return new Stu("汤姆"); } @ 阅读全文
posted @ 2022-09-18 22:54 iTao0128 阅读(40) 评论(0) 推荐(0)
摘要: import boot.bean.Stu; import boot.bean.User; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configu 阅读全文
posted @ 2022-09-18 17:16 iTao0128 阅读(33) 评论(0) 推荐(0)