Spring Boot 2.0.0 终于正式发布-重大修订版本

时间:2019-04-13
本文章向大家介绍Spring Boot 2.0.0 终于正式发布-重大修订版本,主要包括Spring Boot 2.0.0 终于正式发布-重大修订版本使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

北京时间 2018 年 3 月 1 日早上,如约发布的 Spring Boot 2.0 在同步至 Maven 仓库时出现问题,导致在 GitHub 上发布的 v2.0.0.RELEASE 被撤回。目前问题已修复,官方重新发布了 Spring Boot 2.0,并提供了 Maven 中央仓库地址。

使用 Spring Boot 2.0.0 GA

Maven

<parent>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-parent</artifactId>
 <version>2.0.0.RELEASE</version>
</parent>
<dependencies>
 <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
 </dependency>
</dependencies>

Gradle

dependencies {
 compile("org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE")
}

而 Spring Boot 2.0.1 也被标记为 SNAPSHOT 状态

Maven

<parent>
 <groupId>org.springframework.boot</groupId>
 <artifactId>spring-boot-starter-parent</artifactId>
 <version>2.0.1.BUILD-SNAPSHOT</version>
</parent>
<dependencies>
 <dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
 </dependency>
</dependencies><repositories>
 <repository>
  <id>spring-snapshots</id>
  <name>Spring Snapshots</name>
  <url>https://repo.spring.io/libs-snapshot</url>
  <snapshots>
   <enabled>true</enabled>
  </snapshots>
 </repository>
</repositories>

Gradle

dependencies {
 compile("org.springframework.boot:spring-boot-starter-web:2.0.1.BUILD-SNAPSHOT")
}repositories {
 maven {
  url 'https://repo.spring.io/libs-snapshot'
 }
}

官方表示,这个版本经历了 17 个月的开发,有 215 个不同的使用者提供了超过 6800 次的提交。非常感谢所有提供贡献的每一位用户,并感谢所有对这些里程碑版本提供重要反馈的早期采用者。

这是自 4 年前发布 Spring Boot 1.0 以来的第一次重大修订,也是首个提供对 Spring Framework 5.0 支持的 GA 稳定版本。

新版本值得关注的亮点:

基于 Java 8,支持 Java 9

使用 Spring WebFlux/WebFlux.fn 提供响应式 Web 编程支持

支持嵌入式 Netty

Tomcat, Undertow 和 Jetty 均已支持 HTTP/2

支持 Quartz 调度程序

大大简化了安全自动配置

全新的执行器架构,支持 Spring MVC, WebFlux 和 Jersey

总结

以上所述是小编给大家介绍的Spring Boot 2.0.0 终于正式发布-重大修订版本,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!