北京時間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 終於正式發布-重大修訂版本,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對武林網網站的支持!