摘要: @Configuration和@Bean Spring提供了注解@Configuration和@Bean注解用来配置多个Bean,在以前的Spring项目中可以通过xml的方式配置: <beans> <bean id=”xxxBean” class="aaa.bbb.xxxBean"></bean> 阅读全文
posted @ 2022-01-21 13:42 bluesky1 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 在学习使用springboot过程中,我们经常碰到以@Enable开头的注解,其实早在Spring3中就已经出现了类似注解,比如@EnableTransactionManagement、@ EnableWebMvc等,本文以@ EnableAutoConfiguration注解为例跟踪一下源码,分析 阅读全文
posted @ 2022-01-21 13:41 bluesky1 阅读(730) 评论(0) 推荐(0) 编辑