- 2023-10-19 14:00:30
- 1221 热度
- 0 评论
今年的520事情是真的多,把Spring Boot 2.5.0的版本发布都给忽略了!今天就跟DD一起看看Spring Boot 2.5.0又都带来了哪些振奋人心的新特性吧!
主要更新
- 支持 Java 16
- 支持 Gradle 7
- 支持 Jetty 10
- 增强 Docker 镜像的构建
- 更新了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/configprops
和actuator/env
端点现在可以用additional-keys-to-sanitize
来配置不展示的key- 如果要自定义JMX的Actuator端点,可以使用
EndpointObjectNameFactory
- 当classpath下有Spring Security的时候,会自动配置并绑定
RSAPublicKey
和RSAPrivateKey
- RabbitMQ的
ConnectionFactory
现在可以通过ConnectionFactoryCustomizer
来实现自定义 CloudPlatform
现在可以自动侦测Azure App Serviceserver.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中被弃用的内容,大家升级的时候有所涉及的要做好调整哦!
- 原位于
org.springframework.boot.actuate.endpoint.http
包下的ActuatorMediaType
和ApiVersion
被整合并移动到了org.springframework.boot.actuate.endpoint
包下。
原用于实现jOOQ的一些Provider的回调接口以及配置从这个版本开始弃用。后面要使用
org.springframework.boot.autoconfigure.jooq.DefaultConfigurationCustomizer
来替代。原位于
org.springframework.boot.autoconfigure.data.jpa
包下的EntityManagerFactoryDependsOnPostProcessor
移动到org.springframework.boot.autoconfigure.orm.jpa
包下
更多关于Spring Boot 2.5.0的发布资讯可参考官方页面
学习Spring Boot,点击直达这个持续更新多年的免费教程
0 评论
留下评论
热门标签
- Spring(403)
- Boot(208)
- Spring Boot(187)
- Java(82)
- Cloud(82)
- Spring Cloud(82)
- Security(60)
- Spring Security(54)
- Boot2(51)
- Spring Boot2(51)
- Redis(31)
- SQL(29)
- Mysql(25)
- IDE(24)
- Dalston(24)
- JDBC(22)
- IDEA(22)
- mongoDB(22)
- MVC(22)
- Web(21)
- CLI(20)
- Alibaba(19)
- SpringMVC(19)
- SpringBoot(17)
- Docker(17)
- Eclipse(16)
- Vue(16)
- Git(16)
- JPA(15)
- Apache(15)
- ORA(15)
- Oracle(14)
- jdk(14)
- Tomcat(14)
- Linux(14)
- HTTP(14)
- Mybatis(14)
- XML(13)
- JdbcTemplate(13)
- OAuth(13)
- Nacos(13)
- Pro(13)
- JSON(12)
- OAuth2(12)
- Data(12)
- stream(11)
- int(11)
- Myeclipse(11)
- not(10)
- Bug(10)
- maven(9)
- Map(9)
- Hystrix(9)
- ast(9)
- APP(8)
- Bit(8)
- API(8)
- session(8)
- Window(8)
- Swagger(8)
- JavaMail(7)
- Cache(7)
- File(7)
- IntelliJ(7)
- mail(7)
- windows(7)
- too(7)
- HTML(7)
- Github(7)
- Excel(6)
- Log4J(6)
- pushlet(6)
- apt(6)
- read(6)
- Freemarker(6)
- WebFlux(6)
- JSP(6)
- Bean(6)
- error(6)
- Server(6)
- nginx(6)
- ueditor(6)
- jar(6)
- ehcache(6)
- UDP(6)
- RabbitMQ(6)
- star(6)
- and(6)
- Struts(5)
- string(5)
- script(5)
- Syntaxhighlighter(5)
- Tool(5)
- Controller(5)
- swagger2(5)
- ldquo(5)
- input(5)
- Servlet(5)
- Config(5)
- discuz(5)