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

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>	


參數自己配,完畢。。。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章