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>
參數自己配,完畢。。。