SpringBoot 和Spring的区别
2019-02-11 本文已影响2人
黄靠谱
自动装配、简化配置、自带容器
- 自动装配的功能:根据pom.xml配置jar包、和spring 默认配置类,自动注入一些Bean以及给这些Bean注入默认属性值
- 自带web容器:SpringBoot集成了Tomcat、Jetty和Undertow三种web容器,会根据配置生成对应的web容器,默认Tomcat,而不需要额外的配置
- 简化配置:通过‘starter’超级jar包,简化pom.xml的配置;通过properties文件直接对一些类属性赋值,实现无xml的配置
- 监控:Actuator的引入,beans、health、mvc、jvm等信息一目了然
官网解释,不太看得懂
Features
- Create stand-alone Spring applications
- Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
- Provide opinionated 'starter' dependencies to simplify your build configuration
- Automatically configure Spring and 3rd party libraries whenever possible
- Provide production-ready features such as metrics, health checks and externalized configuration
- Absolutely no code generation and no requirement for XML configuration