正在作SpringMVC+Redis整合的練習java
使用的是 spring-data-redis 和 Jedisredis
配置好以後出現瞭如下錯誤:spring
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 沒法搭配使用spa
解決辦法:jedis-2.4.1.jar 和 spring-data-redis-1.3.4.RELEASE.jar 能夠code
這兩個jar包下載地址我共享到網盤上:http://pan.baidu.com/s/1pJ9JFCZblog