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

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

2017-01-18 10:39 816 查看
Spring和redis集成时,启动项目报maxActive属性没有setter和getter方法

严重: Servlet [spring] in web application [/spring_demo] threw load() exception
org.springframework.beans.NotWritablePropertyException: Invalid property 'maxActive' of bean class [redis.clients.jedis.JedisPoolConfig]: Bean property 'maxActive' is not writable or has an invalid setter method. Does the parameter
type of the setter match the return type of the getter?
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1067)
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:926)

通过查找资料发现新版本的jedis修改了maxActive属性为maxTotal ,maxWait改成了maxWaitMillis

修改这两个属性后问题解决
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐