spring - Use of Spring 5.3 with Servlet 3.0
问题描述
I'm working on application which uses Spring Core in version 4.3.14 and Spring Web in version 4.2.13. We don't use Spring MVC. Also, from Spring Web we use just very limited set of classes:
- XmlWebApplicationContext (so classes from org.springframework.web.context)
- RestTemplate (so classes from org.springframework.web.client, here i expect some problems)
- some util classes which probably can be refactored to use something else
My question is: We want to migrate to Spring 5.x. Is such a migration really possible? Or should i expect some severe problems with application startup (class incompatibilites etc). This source for example: https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-5.x#whats-new-in-version-50 says that Servlet 3.1 is required
From the other side, here https://spring.io/blog/2015/06/10/feedback-welcome-spring-5-system-requirements JUERGEN HOELLER wrote that migration to Spring 5 will be a soft one. So i assume that if Application uses only features from JEE6 + Servlet 3.0, then it can be that it will also work on Spring 5.x with JEE6-compatible appserver
Does anyone have an experience in that?
解决方案
与往常一样,Spring Framework 使用新的主要版本升级其基线。在这种情况下,我们需要 JDK8+ 和 Java EE7+。
实际上,这意味着编译后的代码依赖于这些 API,不再使用反射来适应它们。就您而言,这不仅与 Servlet 有关,还与 JPA、JMS、bean 验证和其他规范有关。
您的应用程序可能会在您提到的安排下正常工作,但 Spring 团队不会保证支持此设置。
推荐阅读
- angular - 每当我写“?” 在 {{ forms?.title }} 中,错误消失但标题未显示在页面 ANGULAR8
- compression - 使用素数压缩
- ios - SwiftUI - 如何模糊视图的默认背景颜色?
- http - 桌面应用程序是否需要 HTTP 预检请求?
- python - 如何从 bigtable 获取最近的数据?
- selenium - Selenium side runner 无法在无头模式下下载文件
- openwrt - OpenWrt 和 OpenWISP 的区别
- google-cloud-platform - bigquery.tabledata.insertAll 方法的 API
- css - 线性渐变语法无法理解
- audiokit - 为什么新的 AKSequencer 不产生任何声音?