老师,启动项目找不到RedisHttpSessionConfiguration
来源:8-7 Spring Session实战-3:Cookie注入实战(上)
慕先生2101995
2019-07-26
这是applicationContext-spring-session.xml中的配置
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="20"/>
</bean>
<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
<property name="hostName" value="127.0.0.1"/>
<property name="port" value="6379"/>
<property name="poolConfig" ref="jedisPoolConfig"/>
</bean>
以下是异常
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘categoryManageController’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.service.IUserService com.mmall.controller.backend.CategoryManageController.iUserService; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration] for bean with name ‘redisHttpSessionConfiguration’ defined in class path resource [applicationContext-spring-session.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration] for bean with name ‘redisHttpSessionConfiguration’ defined in class path resource [applicationContext-spring-session.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.data.redis.connection.jedis.JedisConnectionFactory] for bean with name ‘jedisConnectionFactory’ defined in class path resource [applicationContext-spring-session.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.data.redis.connection.jedis.JedisConnectionFactory
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration] for bean with name ‘redisHttpSessionConfiguration’ defined in class path resource [applicationContext-spring-session.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.data.redis.connection.jedis.JedisConnectionFactory] for bean with name ‘jedisConnectionFactory’ defined in class path resource [applicationContext-spring-session.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.data.redis.connection.jedis.JedisConnectionFactory
2回答
-
慕先生2101995
提问者
2019-07-26
老师,找到问题在哪了,只要在在web.xml文件中配置DelegatingFilterProxy就出问题,这是什么原因
<filter-name>springSessionRepositoryFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSessionRepositoryFilter</filter-name>
<url-pattern>*.do</url-pattern>00 -
慕先生2101995
提问者
2019-07-26
spring的版本已经改成4.0.3
00
相似问题