【spring boot】注解@SpringBootApplication 相当于 @Configuration、@EnableAutoConfiguration 、 @ComponentScan 三个的作用

注解@SpringBootApplication 相当于 @Configuration、@EnableAutoConfiguration 、 @ComponentScan 三个的作用

代码示例:GitHub地址 

 

@Configuration

作用在一个类上,相当于xml文件的配置的beans。下面可包含多个@Bean,交给spring去管理。

 

参考:

https://blog.csdn.net/u013076044/article/details/70163257

posted @ 2018-04-11 11:19  Angel挤一挤  阅读(733)  评论(0编辑  收藏  举报