当前位置:   article > 正文

nested exception is redis.clients.jedis.exceptions.JedisConnectionExcep 解决方法

nested exception is redis.clients.jedis.exceptions.jedisconnectionexception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'OrdersIteamController' defined in file [C:\Users\Administrator\Desktop\book\web\target\classes\com\siner\web\OrdersIteamController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.siner.web.OrdersIteamController]: Constructor threw exception; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1320) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.4.RELEASE.jar:5.2.4.RELEASE]

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

如图,我使用Jedis抓不到连接池里的jedis链接,也就是说连接池中没有可用的jedis。
产生这种问题原因我大概发现了2种:

1、properties文件里jedis的配置有问题,要么是写错了,要么是没设置好端口 在这里插入图片描述
2、你没有打开redis 服务器,就是那个CMD小黑框。

在这里插入图片描述
在这里插入图片描述
搞好后,启动IDEA,芜湖 起飞,完美启动

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/497361
推荐阅读
相关标签
  

闽ICP备14008679号