使用Spring集成的redis在提交数据到redis时出现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?
从字面上来看是maxWait这个属性不存在或者是没有getter和setter方法,但是Spring的集成肯定是实现了这两个方法,经过排除那么就是maxWait不存在,通过查询Spring-data-redis的官网,发现高版本SDR的maxWait属性和maxActive属性已经修改成MaxWaitMillis和maxTotal。
所以在redis的配置文件中把属性修改成下面的形式:
<bean id="poolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxIdle" value="${redis.maxId