源地址:http://www.javashuo.com/article/p-yybfnfxm-bb.html.net
虽然定义使用了多个Annotation进行了原信息标注,但实际上重要的只有三个Annotation:blog
@Configuration(@SpringBootConfiguration点开查看发现里面仍是应用了@Configuration)
@EnableAutoConfiguration
@ComponentScan
若是在启动类使用这个三个注解,整个SpringBoot应用依然能够与以前的启动类功能同样。但每次写这3个比较啰嗦,因此写一个@SpringBootApplication方便点。get