zoukankan      html  css  js  c++  java
  • Spring 整合Redis 出现 afterPropertiesSet signature: ()V) Incompatible argument to function 解决办法

     正在做SpringMVC+Redis整合的练习

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

     这两个jar包下载地址我共享到网盘上:http://pan.baidu.com/s/1pJ9JFCZ

  • 相关阅读:
    java线程管理
    java进程间通信
    Possible multiple enumeration of IEnumerable
    Adding Search
    Working with SQL Server LocalDB
    ASP.NET Razor
    ASP.NET Razor
    modelstate.isvalid false
    Razor Intro
    open Command window here
  • 原文地址:https://www.cnblogs.com/zhengbn/p/4138085.html
Copyright © 2011-2022 走看看