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

来源: OSCHINA
编辑:
2018-03-01 15:13:00

北京时间 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

  • 支持 Quartz 调度程序

  • 大大简化了安全自动配置

  • 支持嵌入式 Netty

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

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

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

  • 为各种组件的响应式编程提供了自动化配置,如:Reactive Spring Data、Reactive Spring Security 等

  • 用于响应式 Spring Data Cassandra, MongoDB, Couchbase 和 Redis 的自动化配置和启动器 POM

  • 引入对 Kotlin 1.2.x 的支持,并提供了一个 runApplication 函数,让你通过惯用的 Kotlin 来运行 Spring Boot 应用程序。更多信息请参阅参考文档中对 Kotlin 的支持部分

  • 启动时的 ASCII 图像 Spring Boot banner 现已支持 GIF

官方新闻:https://spring.io/blog/2018/03/01/spring-boot-2-0-goes-ga  
发布说明:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes

这篇资讯介绍了 Spring Boot 2 中值得关注的新特性:https://www.oschina.net/news/93772/spring-boot-2-0-released-not-yet

有关 Spring Boot 2.0 更详细的迁移指南,可以保持关注我们正在翻译的官方文档。(https://www.oschina.net/translate/spring-boot-2-0-migration-guide)
欢迎有兴趣的开发者一起参与翻译~!

展开阅读全文
点击加入讨论🔥(51) 发布并加入讨论🔥
本篇精彩评论
非常好,但我用#Jboot#
2018-03-02 09:00
9
举报
对kotlin支持如何!
2018-03-01 15:50
5
举报
搞不懂为啥我提交的一个bug报告为啥没有修复
https://github.com/spring-projects/spring-boot/issues/11247,难道EndpointID不能有大写吗?
分享一下我写的 Spring Boot 2的例子:
https://gitee.com/xiandafu/Spring-Boot-2.0-Samples
https://gitee.com/xiandafu/springboot-plus
2018-03-01 23:49
3
举报
真是太详细了,试着成功写了一个基于SpringBoot的REST API,用Wisdom RESTClient顺利测通,生成精美的测试报告和API文档。
https://github.com/Wisdom-Projects/rest-client

谢谢分享,很有帮助了!
赞一个!
2018-03-14 12:51
1
举报
那个启动Banner搞成gif有啥意义?
2018-03-02 10:03
1
举报
51 评论
40 收藏
分享
返回顶部
顶部