您的位置:首页 > 数据库 > Redis

Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]: Bean property

2016-09-05 12:45 477 查看
Invalid property ‘maxWait’ of bean class [redis.clients.jedis.JedisPoolConfig]: Bean property ‘maxWait’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 
如题报了这样一个错,显然是因为maxActive和maxWait没有找到导致的 
说明高版本的jedis中移除了这两个属性 

通过查看确实是这样的

新版本的jedis中将maxActive改成了maxTotal , MaxWait改成了MaxWaitMillis

所以poolConfig中向我这样写就可以了

<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="${redis.pool.maxActive}" />
<property name="maxIdle" value="${redis.pool.maxIdle}" />
<property name="MaxWaitMillis" value="${redis.pool.maxWait}" />
<property name="testOnBorrow" value="${redis.pool.testOnBorrow}" />
</bean>

参数自己配,完毕。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  redis jedis maxActive
相关文章推荐