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