SpringBoot 特性
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot 特性相关的知识,希望对你有一定的参考价值。
参考技术A 创建独立的Spring应用,是SpringBoot的首要特性SpringBoot 1.x版本中有且仅有Servlet容器实现,包括传统的Servlet和Spring Web MVC,总2.0版本开始增加了Reactive Web容器实现,即Spring 5.0 WebFlux,所以在SpringApplication API上薪资了setWebApplicationType()方法,允许程序显示的设置Web应用的枚举类型。
枚举类型如下:
NONE:非Web应用
SERVLET:
REACTIVE WEB:
主要用于服务提供、调度任务、消息处理等场景;
在传统的Spring应用中,外置容器需要启动脚本引导,随着生命周期的回调执行Spring上下文的初始化,比较有代表性的是SpringWeb的ContextLoaderListener和Web MV中的DispatchServlet,前者利用ServletContext生命周期构建Web Root Spring上下文,后者结合 Servlet生命周期创建DispatchServlet的Spring应用上下文。无论何种方式,均属于被动的回调执行,这也是为什么它们并没有完整的应用主导权的原因。
然而当SpringBoot出现嵌入式容器启动方式后,嵌入式容器称为应用的一部分,从本质上来说,它属于Spring应用上下文中的组件Beans,这些组件和其他组件均有自动装配特性组装成Spring Bean定义BeanDefinition,随着Spring应用上下文启动而注册并初始化。驱动Spring应用上下文启动的核心组件则是SpringBoot核心API,SpringApplication。
mvn archetype:generate -DgroupId=thinking-in-spring-boot -DartifactId=first-spring-boot-application -Dversion=1.0.0-SNAPSHOT -DinteractiveMode=false -Dpackage=thinking.in.spring.boot
运行springboot:mvn spring-boot:run
官方文档告知开发人员构建可执行jar的前提是添加spring-boot-maven-plugin到pom.xml文件中。
SpringBoot可执行JAR资源结构:
SpringBoot各版本新增特性详细一览
参考技术A 参考链接:https://github.com/spring-projects/spring-boot/tags下图为各版本维护时间:
spring-buildmaster released this on 13 Nov · 482 commits to master since this release
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes#new-and-noteworthy
待更新
philwebb released this on 15 May · 3547 commits to master since this release
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.3-Release-Notes#new-and-noteworthy
For full upgrade instructions and new and noteworthy features please see the release notes .
待更新
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes#new-and-noteworthy
spring-buildmaster released this on 17 Oct 2019 · 6503 commits to master since this release
待更新
spring-buildmaster released this on 30 Oct 2018 · 10866 commits to master since this release
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.1-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 1 Mar 2018 · 14392 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 30 Jan 2017 · 20057 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.5-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 29 Jul 2016 · 21635 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.4-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 16 Nov 2015 · 23756 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.3-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 11 Dec 2014 · 26431 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.2-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 11 Jun 2014 · 27753 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.1-Release-Notes#new-and-noteworthy
待更新
spring-buildmaster tagged this on 1 Apr 2014 · 28431 commits to master since this tag
参考链接:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.0-Release-Notes#new-and-noteworthy
待更新
以上是关于SpringBoot 特性的主要内容,如果未能解决你的问题,请参考以下文章