码迷,mamicode.com
首页 > 移动开发 > 详细

@SpringBootApplication

时间:2016-10-13 16:53:26      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

1. spring 文档说明

Many Spring Boot developers always have their main class annotated with @Configuration, @EnableAutoConfiguration and @ComponentScan. Since these annotations are so frequently used together (especially if you follow the best practices above), Spring Boot provides a convenient @SpringBootApplication alternative.

The @SpringBootApplication annotation is equivalent to using @Configuration, @EnableAutoConfiguration and @ComponentScan with their default attributes。

@SpringBootApplication是 @Configuration, @EnableAutoConfiguration and @ComponentScan 的组合。

使用时一般写明要扫描的包 @SpringBootApplication(scanBasePackages="com.example")

 

stereotype annotations 构造型注解

@SpringBootApplication

标签:

原文地址:http://www.cnblogs.com/shuixm/p/5957024.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!