Spring 集成Redis遇到问题nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoo

Spring 集成Redis遇到问题nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

但实际已在pom.xml中添加依赖
可能是jedis的版本问题,将jedis版本修改后问题解决(待研究

Exception in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPoolConfig] for bean with name 'poolConfig' defined in class path resource [redis.spring.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1357)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:628)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1450)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:980)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
    at com.lgd.study.SpringRedis.App.main(App.java:23)
Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)
    at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1402)
    at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1349)
    ... 10 more

欢迎大家关注我的微信公众号,会分享一些好玩的笑话、小知识
Spring 集成Redis遇到问题nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoo_第1张图片

你可能感兴趣的:(redis学习)