我用Spring mvc 3.0.9開發了一些其他服務。在某些情況下,我有一個例外。這取決於我的春天版本使用Servlet 3.0 api(我的應用程序服務器是jboss eap 5.1)。什麼是與Servlet 2.5兼容的最新spring mvc版本?謝謝。春天mvc與Servlet 2.5兼容
回答
Spring 3.2應該使用Servlet 2.5 API。
只有春天4.0要求的Serlvet 3.0:
參考這個官方documentation獲取更多信息。
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.
不,版本3.2使用Servlet 3.0,FrameWorkServlet使用Servlet 3.0的HttpServletResponse方法: 'java.lang.NoSuchMethodError:javax.servlet.http.HttpServletResponse.getHeader(Ljava/lang/String;)Ljava/lang/String;在框架服務器。 –
Spring 4.0與Servlet 2.5一起工作。
見文件:(https://docs.spring.io/spring/docs/4.3.14.RELEASE/spring-framework-reference/htmlsingle/)
3.4的Java EE 6和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.
3.7通用的Web改進
Deployment to Servlet 2.5 servers remains an option, but Spring Framework 4.0 is now focused primarily on Servlet 3.0+ environments. If you are using the Spring MVC Test Framework you will need to ensure that a Servlet 3.0 compatible JAR is in your test classpath.
- 1. 從春天2.5 MVC到春天3.0 MVC
- 2. Spring MVC 2.5 servlet/portlet兼容URL
- 3. Spring security 4.x與Servlet 2.5不兼容?
- 4. 春天MVC servlet映射
- 5. 駱駝春天是否與春天ws 2.0.2.RELEASE兼容?
- 6. 如何實現jQuery.ajax(dataType:json)春天mvc 2.5
- 7. 在春天創建web服務mvc 2.5
- 8. Java的春天MVC - java.lang.NoClassDefFoundError:javax/servlet/ServletContext
- 9. 是不是spring 3.2需要servlet 3.0或者它與servlet 2.5兼容
- 10. 編碼與春天MVC
- 11. 與春天的嚮導MVC
- 12. 哪個ORM工具與Firebird 2.5兼容?
- 13. 功能不兼容的參數camelContext與春天xml
- 14. 是春天的安全3.2.3.RELEASE與JDK 1.8兼容
- 15. 聊天春天MVC webUI
- 16. 春天不能servlet的
- 17. 春天資料/ servlet上下文根
- 18. spring兼容javax servlet
- 19. 在春天ehcaching mvc
- 20. 春天mvc類樹
- 21. 春天的Servlets mvc
- 22. ehcache在春天mvc
- 23. DTO在春天mvc
- 24. 春天MVC 3 + JSON
- 25. 春天MVC嘲笑
- 26. 春季課程與MockHttpSession不兼容
- 27. 春天的flash上下文2.5
- 28. ServiceStack MVC powerpack與ASP.NET MVC 4兼容嗎?
- 29. 與Materialisecss春天MVC複選框
- 30. 應用引擎部署與春天MVC
http://stackoverflow.com/questions/24217568/does-spring-3-2-require-servlet-3-0-or-it-works-with-servlet-2-5 – sura2k