01 2022 档案

摘要:@Configuration和@Bean Spring提供了注解@Configuration和@Bean注解用来配置多个Bean,在以前的Spring项目中可以通过xml的方式配置: <beans> <bean id=”xxxBean” class="aaa.bbb.xxxBean"></bean> 阅读全文
posted @ 2022-01-21 13:42 bluesky1 阅读(71) 评论(0) 推荐(0) 编辑
摘要:在学习使用springboot过程中,我们经常碰到以@Enable开头的注解,其实早在Spring3中就已经出现了类似注解,比如@EnableTransactionManagement、@ EnableWebMvc等,本文以@ EnableAutoConfiguration注解为例跟踪一下源码,分析 阅读全文
posted @ 2022-01-21 13:41 bluesky1 阅读(1085) 评论(0) 推荐(0) 编辑
摘要:学习过springboot的都知道,在Springboot的main入口函数中调用SpringApplication.run(DemoApplication.class,args)函数便可以启用SpringBoot应用程序,跟踪一下SpringApplication源码可以发现,最终还是调用了Spr 阅读全文
posted @ 2022-01-20 09:52 bluesky1 阅读(267) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示