Redis集群测试错误解决java.lang.NumberFormatException: For input string: "7006@17006"

报错显示:

java.lang.NumberFormatException: For input string: "7006@17006"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.valueOf(Integer.java:766)
	at redis.clients.util.ClusterNodeInformationParser.getHostAndPortFromNodeLine(ClusterNodeInformationParser.java:38)
	......

解决方案:

/**
		 * 报错如下:
		 * 		java.lang.NumberFormatException: For input string: "7006@17006"
		 * 集群环境Redis使用的是4.0.1的版本
		 * 		报错之前使用的jedis版本为2.7.2
		 * 		之后版本替换为2.9.0完美解决问题
		 * 	<dependency>
		 *	    <groupId>redis.clients</groupId>
		 *    	<artifactId>jedis</artifactId>
		 *	    <version>2.9.0</version>
		 *	    <type>jar</type>
		 *	    <scope>compile</scope>
		 *	</dependency>
		 * 
		 */
发布了223 篇原创文章 · 获赞 20 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_30242987/article/details/99755603
今日推荐