0
我从存储库下载的项目无法在Apache Tomcat 7上运行。它是一个Spring 4.1.6应用程序,具有Spring security 4.0.1和OpenAM 10.0.0版本。在运行过程中对我的本地的Apache Tomcat 7实例失败与错误,指出Spring Security 4无法在Tomcat上创建bean FilterChain 7
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains':
...
嵌套的例外是
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class
[org.springframework.security.web.authentication.session.ChangeSessionIdAuthenticationStrategy]: Constructor threw exception;
nested exception is java.lang.IllegalStateException: HttpServletRequest.changeSessionId is undefined. Are you using a Servlet 3.1+ environment?
pom.xml文件中设置了
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
我知道这是一个构建环境配置问题,因为源代码已在另一台机器上成功运行。有什么需要改变,以获得filterChains豆被成功
'HttpServletRequest.changeSessionId是未定义的。 Tomcat 7不支持Servlet 3.1,你需要Tomcat 8。 –