搜索
您的当前位置:首页正文

java启动过滤器异常_java – Spring:异常启动过滤器springSecurityFilterChain

来源:二三娱乐

我正在使用

Spring 3.1.2-Release编写一个应用程序. App服务器是Tomcat 7.

当我启动服务器我得到这个错误:

SEVERE: Exception starting filter springSecurityFilterChain

org.springframework.beans.factory.NoSuchBeanDefinitionException: No

bean named ‘springSecurityFilterChain’ is defined at

org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:553)

at

org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)

at

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)

at

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at

org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1102)

这是我的配置文件:

web.xml

myTest

contextConfigLocation

/WEB-INF/spring/root-context.xml

defaultHtmlEscape

true

org.springframework.web.context.ContextLoaderListener

org.springframework.security.web.session.HttpSessionEventPublisher

springTest

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

/WEB-INF/spring/servlet-context.xml

1

springTest

/

springSecurityFilterChain

org.springframework.web.filter.DelegatingFilterProxy

springSecurityFilterChain

/*

这是root-context.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"

xmlns:c="http://www.springframework.org/schema/c" xmlns:context="http://www.springframework.org/schema/context"

xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:util="http://www.springframework.org/schema/util"

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd

http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd

http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd

http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd

http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">

这是

security-config.xml

xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd

http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">

有任何想法吗?

因篇幅问题不能全部显示,请点此查看更多更全内容

Top