升级到 Spring 5 是否需要 Tomcat 8.5+

Does upgrade to Spring 5 require Tomcat 8.5+

每个升级到 Spring 5 的教程都有 tomcat 8.5+ 作为要求,但没有详细说明。我要升级的应用程序不应 运行 作为具有嵌入式网络服务器的独立应用程序,而是部署在 tomcat 6 上,由于多种原因我们无法升级。

正如@procrastinate_later 指出的那样,Spring 5 实际上需要 Servlet 3.1(和 Tomcat 8.5.x)。

Spring 5 最初预计有 Servlet 3.0+ minimum requirement which supported only from tomcat 7

We’ll definitely raise to Servlet 3.0+ (from our present Servlet 2.5 runtime compatibility)

所以你至少需要升级到Tomcat7.

查看 What's New in Spring Framework 5.x documentation:

Java EE 7 API level required in Spring's corresponding features now.

  • Servlet 3.1, Bean Validation 1.1, JPA 2.1, JMS 2.0
  • Recent servers: e.g. Tomcat 8.5+, Jetty 9.4+, WildFly 10+

将此与 Apache Tomcat Which Version documentation, Tomcat 8.0 would be sufficient for the Servlet 3.1 requirement, but Tomcat 8.0 has been superseded by Tomcat 8.5+, as stated in the Which Version (Tomcat 8.x) documentation 交叉引用:

Tomcat 8.5 is thought as a replacement for Tomcat 8.0. Please refer to Migration guide for guidance on migrating to Tomcat 8.5....Users of Tomcat 8.0 should be aware that Tomcat 8.0 has now reached end of life. Users of Tomcat 8.0.x should upgrade to Tomcat 8.5.x or later.