zoukankan      html  css  js  c++  java
  • maven项目中使用redis集群报错: java.lang.NumberFormatException: For input string: "7006@17006"

    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [redis.clients.jedis.JedisCluster]: Constructor threw exception; nested exception is java.lang.NumberFormatException: For input string: "7006@17006"

    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)

    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)

    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)

    ... 65 more

    Caused by: java.lang.NumberFormatException: For input string: "7006@17006"

    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

    解决:由于redis集群的采用的版本是4.1的,在maven的pom.xml中将jedis的版本改成2.9的就可以了,

        <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>2.9.0</version>
        </dependency>
  • 相关阅读:
    Linux rpm 安装MySQL
    AOP 底层实现原理
    7 AOP
    HTTP 协议
    Oracle JDBC 标准连接实例
    Oracle JDBC 连接池
    Anaconda XGBoost安装
    Anaconda Spyder 导入自定义函数(模块)
    Hive常用sql
    决策树之信息增益计算模拟
  • 原文地址:https://www.cnblogs.com/qq1871707128/p/8081788.html
Copyright © 2011-2022 走看看