2

Spring Boot 2.5.0 发布:支持Java16、Gradle 7、Datasource初始化机制调整

 3 years ago
source link: https://blog.didispace.com/spring-boot-2-5-0-release/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Spring Boot 2.5.0 发布:支持Java16、Gradle 7、Datasource初始化机制调整

Spring Boot 2.5.0 发布:支持Java16、Gradle 7、Datasource初始化机制调整

今年的520事情是真的多,把Spring Boot 2.5.0的版本发布都给忽略了!今天就跟DD一起看看Spring Boot 2.5.0又都带来了哪些振奋人心的新特性吧!

  1. 支持 Java 16
  2. 支持 Gradle 7
  3. 支持 Jetty 10
  4. 增强 Docker 镜像的构建
  5. 更新了Datasource的初始化机制

除了框架功能更新之后,该版本在文档方面也顺应时代潮流,增加了暗黑模式的支持!

长这样,是你喜欢的阅读模式吗?

  • management.endpoints.web.cors.allowed-origin-patterns配置可以用来控制是否允许Actuator端点跨域访问
  • HttpSessionIdListener现在开始自动注册到Servlet上下文
  • Couchbase现在默认使用自动化配置的ObjectMapper
  • Elasticsearch的Sniffer会根据classpath下是否存在elasticsearch-rest-client-sniffer模块来自动配置
  • spring.data.cassandra.controlconnection.timeout现在可以用来配置Cassandra的连接超时控制
  • spring.kafka.listener.only-log-record-metadata现在可以用来配置重试时记录的元数据
  • 支持Apache Phoenix,自动检测jdbc:phoenix这样的JDBC链接配置
  • /actuator的发现页现在可以通过management.endpoints.web.discovery.enabled配置来禁用
  • /actuator/configpropsactuator/env端点现在可以用additional-keys-to-sanitize来配置不展示的key
  • 如果要自定义JMX的Actuator端点,可以使用EndpointObjectNameFactory
  • 当classpath下有Spring Security的时候,会自动配置并绑定RSAPublicKeyRSAPrivateKey
  • RabbitMQ的ConnectionFactory现在可以通过ConnectionFactoryCustomizer来实现自定义
  • CloudPlatform现在可以自动侦测Azure App Service
  • server.tomcat.keep-alive-timeout可以用来配置Tomcat在关闭keep-alive连接之前等待另一个请求的时间。
  • server.tomcat.max-keep-alive-requests可以用来控制在keep-alive状态的连接关闭之前可以保持的最大请求数。
  • spring.webflux.session.cookie.same-site用来配置WebFlux的SameSite cookie策略,默认为lax
  • Apache HttpCient 5现在是默认的自动化配置使用WebClient

依赖组件版本

在Spring Boot 2.5 中更新了各项依赖组件的版本,具体清单如下:

  • Spring Data 2021.0
  • Spring HATEOAS 1.3
  • Spring Integration 5.5
  • Spring Kafka 2.7
  • Spring Retry 1.3
  • Spring Security 5.5
  • Spring Session 2021.0

下面是第三方依赖组件的版本清单:

  • Kotlin 1.5
  • Groovy 3.0
  • Flyway 7.7
  • Liquibase 4.2
  • Jackson 2.12
  • Kafka 2.7
  • Cassandra Driver 4.10
  • Embedded Mongo 3.0
  • Hibernate Validator 6.2
  • Jersey 2.33
  • Mockito 3.7
  • MongoDB 4.2
  • JUnit Jupiter 5.7
  • Elasticsearch 7.12

以下是Spring Boot 2.5中被弃用的内容,大家升级的时候有所涉及的要做好调整哦!

  1. 原位于org.springframework.boot.actuate.endpoint.http包下的ActuatorMediaTypeApiVersion被整合并移动到了org.springframework.boot.actuate.endpoint包下。
  1. 原用于实现jOOQ的一些Provider的回调接口以及配置从这个版本开始弃用。后面要使用org.springframework.boot.autoconfigure.jooq.DefaultConfigurationCustomizer来替代。

  2. 原位于org.springframework.boot.autoconfigure.data.jpa包下的EntityManagerFactoryDependsOnPostProcessor移动到org.springframework.boot.autoconfigure.orm.jpa包下

更多关于Spring Boot 2.5.0的发布资讯可参考官方页面

学习Spring Boot,点击直达这个持续更新多年的免费教程

下一篇

✕Error. Try later.You have blocked Push Notifications. Follow these instructions to enable Push Notifications.Subscribe to receive push notifications on latest updates第一时间获得DD的最新分享!You are subscribed to Push NotificationsSUBSCRIBE订阅!UNSUBSCRIBE⚡ by Webpushr

Logo答应我!

好好学习,天天向上!必须的Cookie & Data Storage DetailCookies & Server Data Storage DisclosureBelow are all cookies & data points that will be stored to help us enable web push notifications.Go BackCookies (3)A Cookie is a small piece of data that we will store in your browser.Show cookie info_webpushrPromptActionThis cookie is stored if you do not accept to receive push notifications from us and dismiss this prompt. This helps us remember your decision._webpushrEndPointThis cookie stores a unique URL associated with your push subscription. It is only stored if you accept to receive push notifications from us. This helps us successfully manage and send push notifications to you._webpushrLastVisitThis cookie stores timestamp associated with your last visit on our site. It is only stored if you accept to receive push notifications from us. This helps us successfully manage and send push notifications to you.Server Data Storage (11)Server Data Storage are small data points that will be securely stored by us only if you accept to receive push notifications.Show data infodateTimestamp associated with your push subscription start dateendpointA custom URL and associated encrypted keys pointing to a push server that enable us to send you push notifications.timezoneYour local timezone relative to GMTdevice_typeYour device type. Possible values are Mobile or Desktop.operating_systemYour operating system such as Mac OS, Windows, Android, etc.browserYour browser detail, such as Chrome, Firefox, Opera, Edge, etc.ip_addressYour IP addresscityGeographic Location: CitystateGeographic Location: StatecountryGeographic Location: Countrysession_dateDate corresponding to your last visit on our sitePowered By Webpushr


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK