does spring 3.2 require servlet 3.0 or it works with servlet 2.5

北城余情 提交于 2019-12-08 07:43:07

问题


I am using spring 3.2.4 in my application but some of the features are not working properly like @controllerAdvice. I know that it is a feature added in spring 3.2. I am using servlet 2.5.I googled about spring 3.2 and found that

The Spring MVC programming model now provides explicit Servlet 3 async support.

Kindly tell me does spring 3.2 works with servlet 2.5 or not?


回答1:


Spring 3.2 should work with Servlet 2.5 API.

Only Spring 4.0 requires Serlvet 3.0:

(http://docs.spring.io/spring/docs/current/spring-framework-reference/html/new-in-4.0.html)

3 New Features and Enhancements in Spring Framework 4.0)

3.4 Java EE 6 and 7

Java EE version 6 or above is now considered the baseline for Spring Framework 4, with the JPA 2.0 and Servlet 3.0 specifications being of particular relevance. In order to remain compatible with Google App Engine and older application servers, it is possible to deploy a Spring 4 application into a Servlet 2.5 environment. However, Servlet 3.0+ is strongly recommended and a prerequisite in Spring’s test and mock packages for test setups in development environments.



来源:https://stackoverflow.com/questions/24217568/does-spring-3-2-require-servlet-3-0-or-it-works-with-servlet-2-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!