简体   繁体   English

将java 1.7 webapp升级到openjdk 19时如何识别使用哪个版本spring框架?

[英]How to identify which version spring framework to use when upgrading java 1.7 webapp to openjdk 19?

Few years back, I develop a web application using Java 1.7, SpringFramework 4.1.1.RELEASE and Hibernate 3.6.10.Final.几年前,我使用 Java 1.7、SpringFramework 4.1.1.RELEASE 和 Hibernate 3.6.10.Final 开发了一个 web 应用程序。 This webapp is running on Tomcat 7.0.4 at the time.这个 webapp 当时在 Tomcat 7.0.4 上运行。

Now, I planning to upgrade and compile everything using OpenJDK 19, and Tomcat 10.1.现在,我计划使用 OpenJDK 19 和 Tomcat 10.1 升级和编译所有内容。 How do I know which version to use in my pom.xml (Maven) so that theres no error after compilation and during runtime.我如何知道在我的 pom.xml (Maven) 中使用哪个版本,以便在编译后和运行期间没有错误。

WHat should I do first?我应该先做什么?

Using the latest Eclipse and I have downloaded both Tomcat 10.1 and OpenJDK 19. I've set the Java Compiler to openJDK 19 and added both JRE System Library and Server Runtime in the build path.使用最新的 Eclipse,我下载了 Tomcat 10.1 和 OpenJDK 19。我将 Java 编译器设置为 openJDK 19,并在构建路径中添加了 JRE 系统库和服务器运行时。 I have also added some more jar file to fix issues in Marker tab but I encountered error during starting up application.我还添加了一些 jar 文件来修复标记选项卡中的问题,但我在启动应用程序时遇到了错误。

Tomcat 10.1 usesServlet API 6.0 which is now part of Jakarta EE. Tomcat 10.1 使用Servlet API 6.0 ,它现在是 Jakarta EE 的一部分。 As part of the move from Java EE to Jakarta EE, the packages in javax.servlet.* are moved to jakarta.servlet.* since the error you are getting.作为从 Java EE 迁移到 Jakarta EE 的一部分, javax.servlet.*中的包被移动到jakarta.servlet.* ,因为您遇到了错误。

If your target platform is Tomcat 10.1, you should move to Spring Framework 6.如果你的目标平台是 Tomcat 10.1,你应该移动到 Spring Framework 6。

Check the migration guide查看迁移指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM