Spring注解之:@SpringBootApplication
2016-02-07 18:27
761 查看
@SpringBootApplicationis
a convenience annotation that adds all of the following:
@Configurationtags
the class as a source of bean definitions for theapplication context.
@EnableAutoConfigurationtells
Spring Boot to start adding beans based on classpath settings,other beans,and
various property settings.
Normally you would add
@EnableWebMvcfor
a Spring MVC app, but Spring Boot adds it automatically when it sees spring-webmvc on the classpath. This flags the application as a web application and activates key behaviors such as
setting up a
DispatcherServlet.
(DispatcherServlet是什么可看这里 http://blog.csdn.net/zhouhuakang/article/details/50643034)
@ComponentScantells
Spring to look for other components, configurations, and services in the the
hellopackage,
allowing it to find the
HelloController.
参考
1.https://spring.io/guides/gs/spring-boot/
相关文章推荐
- Android应用:StatusBar状态栏、NavigationBar虚拟按键栏、ActionBar标题栏、Window屏幕内容区域等的宽高
- Android应用:StatusBar状态栏、NavigationBar虚拟按键栏、ActionBar标题栏、Window屏幕内容区域等的宽高
- Gradle的使用
- iOS 协议 委托
- android Scroller类详解
- ios 崩溃信息获取代码
- 文件的下载和断电续传
- IoSetNextIrpStackLocation routine
- 【Android开发小记--17】一键清理
- 【Android开发小记--16】assets、raw、内部存储、外部存储——文件的读写
- JS调试输出Object
- WINDOWS.H already included. MFC apps must not #include <windows.h>
- 2.2-call与apply
- 【Android开发小记--15】录制视频
- iOS 归档archive使用方法
- android:qq的欢迎界面
- 【Android开发小记--14】简单拍照功能的实现
- android studio 快捷键--持续更新
- Android 俄罗斯方块开发(附源码)
- 【Android开发小记--13】录制音频