No bean named 'springSecurityFilterChain' is defined 解决办法

No bean named 'springSecurityFilterChain' is defined

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:387)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:971)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:168)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:884)
at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:216)
at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:145)
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:179)

使用Spring security时,出现上面的问题。

网上找了很多解决资料包括:http://www.cnblogs.com/jerome-rong/archive/2012/05/03/2480211.html

以及将<http auto-config="true" >等等 都没有解决到。

折腾了很久后,还是启动时一直报这个错误。编译环境是使用MyEclipse 10的自带编译,并使用MyEclipse 10的自带发布功能,结果就跑到发布路径下看,发现class文件下没有applicationContext-security.xml文件!!!!!!!!!!!!!!!!!!!!!

猜你喜欢

转载自danker-dai.iteye.com/blog/2008647
今日推荐