为了账号安全,请及时绑定邮箱和手机立即绑定

redis连接不上

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring.xml]: Cannot resolve reference to bean 'sessionManager' while setting bean property 'sessionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionManager' defined in class path resource [spring/spring.xml]: Cannot resolve reference to bean 'redisSessionDao' while setting bean property 'sessionDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisSessionDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jedisUtil': Unsatisfied dependency expressed through field 'jedisPool'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jedisPool' defined in class path resource [spring/spring-redis.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [redis.clients.jedis.JedisPool]: Constructor threw exception; nested exception is redis.clients.jedis.exceptions.InvalidURIException: Cannot open Redis connection due invalid URI. 127.0.0.1


我是装有redis的,并且redis服务也启动了


正在回答

1 回答

找到问题了,之前也看有人提过配置的问题,只是没有理解。下面是连接不上redis的参考:https://blog.csdn.net/mxlwd168/article/details/76136090

我spring-redis.xml中修改后是这样的:

https://img1.sycdn.imooc.com//5d2962d3000144cd08850141.jpg

加上 type属性就可以了

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

redis连接不上

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信