org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSessionReposit

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

從spring給出的異常能夠看出是沒有取到這個bean,而後糾結了半天,各類版本切換找問題依舊未解決,而後Google找了半天,web

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

 

只能試着本身解決了。spring

 

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

<?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了。。app

相關文章
相關標籤/搜索