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


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]

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

1、properties文件里jedis的配置有问题,要么是写错了,要么是没设置好端口 nested exception is redis.clients.jedis.exceptions.JedisConnectionExcep 解决方法_第1张图片
2、你没有打开redis 服务器,就是那个CMD小黑框。

nested exception is redis.clients.jedis.exceptions.JedisConnectionExcep 解决方法_第2张图片
nested exception is redis.clients.jedis.exceptions.JedisConnectionExcep 解决方法_第3张图片
搞好后,启动IDEA,芜湖 起飞,完美启动

你可能感兴趣的:(redis)