Spring 整合Redis 出现 afterPropertiesSet signature: ()V) Incompatible argument to function 解决办法


使用的是 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 可以


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM