org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSessionRepositoryFilter' is defined


spring-session 集成redis,web.xml配置filter時候出現  No bean named 'springSessionRepositoryFilter' is defined

從spring給出的異常可以看出是沒有取到這個bean,然后糾結了半天,各種版本切換找問題依舊未解決,然后Google找了半天,

也是沒有找到問題解決方式,stackoverflow上也有許多人提出該問題,但是看了下面的解決方式,然並卵,一個都沒用。。。

 

只能試着自己解決了。

 

既然沒找到bean,那我就注入這個bean,看下我的解決方式。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"    
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
       xmlns:context="http://www.springframework.org/schema/context"           
       xsi:schemaLocation="http://www.springframework.org/schema/beans    
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd    
           http://www.springframework.org/schema/context   
           http://www.springframework.org/schema/context/spring-context-3.0.xsd">    
	<bean id="configurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>classpath:log4j.properties</value>
				<value>classpath:application.properties</value>
			</list>
		</property>
	</bean>
	 <context:component-scan base-package="org.springframework.web.filter.DelegatingFilterProxy"/>
</beans>

  

OK了。。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM