警告: Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionFactory' defined
in class path resource [applicationContext-redis.xml]: Bean instantiation via constructor failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.data.redis.connection.jedis.JedisConnectionFactory]: Constructor threw exception;
nested exception is java.lang.NoSuchMethodError:
org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V
Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'connectionFactory' defined in class path resource [applicationContext-redis.xml]:
Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.data.redis.connection.jedis.JedisConnectionFactory]:
Constructor threw exception; nested exception is java.lang.NoSuchMethodError:
org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V
当前jar版本
jedis 2.9
spring-data-redis 2.0.5
原因发现是spring-data-redis 版本过高 降低到1.7.2 可以正常运行