使用的是 spring-data-redis 和 Jedis
配置好之后出现了以下错误:
Caused by: java.lang.VerifyError: (class: org/springframework/data/redis/connection/jedis/JedisConnectionFactory, method: afterPropertiesSet signature: ()V) Incompatible argument to function at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getDeclaredConstructor(Unknown Source) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:78) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990) ... 28 more
这个错误时jar包冲突引起的,其中:jedis-2.4.1.jar 和 spring-data-redis-1.0.1.RELEASE.jar 无法搭配使用
解决办法:jedis-2.4.1.jar 和 spring-data-redis-1.3.4.RELEASE.jar 可以
时间: 2024-10-12 04:02:21