首页 > 移动平台 > 详细

@SpringBootApplication

时间:2016-10-13 16:53:01      阅读:171      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!