码迷,mamicode.com
首页 > 编程语言 > 详细

maven项目中使用redis集群报错: java.lang.NumberFormatException: For input string: "7006@17006"

时间:2017-12-21 19:39:51      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:clust   port   图片   src   iat   XML   alt   sim   group   

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>

 

maven项目中使用redis集群报错: java.lang.NumberFormatException: For input string: "7006@17006"

标签:clust   port   图片   src   iat   XML   alt   sim   group   

原文地址:http://www.cnblogs.com/qq1871707128/p/8081788.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!