我用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. Spring security 4.x與Servlet 2.5不兼容?
- 2. 春天MVC servlet映射
- 3. 駱駝春天是否與春天ws 2.0.2.RELEASE兼容?
- 4. 在春天創建web服務mvc 2.5
- 5. 如何實現jQuery.ajax(dataType:json)春天mvc 2.5
- 6. 與春天的嚮導MVC
- 7. 編碼與春天MVC
- 8. 哪個ORM工具與Firebird 2.5兼容?
- 9. 是春天的安全3.2.3.RELEASE與JDK 1.8兼容
- 10. 功能不兼容的參數camelContext與春天xml
- 11. 春天不能servlet的
- 12. 春天資料/ servlet上下文根
- 13. 春天的flash上下文2.5
- 14. 春季課程與MockHttpSession不兼容
- 15. DTO在春天mvc
- 16. 春天的Servlets mvc
- 17. 在春天ehcaching mvc
- 18. 與Materialisecss春天MVC複選框
- 19. 應用引擎部署與春天MVC
- 20. 春天mvc安全配置
- 21. 火鳥2.5數據庫兼容
- 22. JADE與春天?
- 23. 如何在春天MVC
- 24. 春天或servlet請求範圍問題
- 25. 春季框架與其他春季項目的兼容性
- 26. 春天窗體標記和HTML 5仍然不兼容?
- 27. 捆紮機找不到兼容版本的寶石「春天」
- 28. 春天mvc網站的根(「/」)
- 29. 春天mvc:資源標籤
- 30. 分頁在春天mvc
http://stackoverflow.com/questions/24217568/does-spring-3-2-require-servlet-3-0-or-it-works-with-servlet-2-5 – sura2k