当前位置:
首页 >
前端技术
> javascript
>内容正文
javascript
Spring-data-redis集成提交数据出现'maxActive'和‘maxWaitMillis’错误
生活随笔
收集整理的这篇文章主要介绍了
Spring-data-redis集成提交数据出现'maxActive'和‘maxWaitMillis’错误
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
使用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的配置文件中把属性修改成下面的形式:
再次测试向redis中写入文件,成功!
与50位技术专家面对面20年技术见证,附赠技术全景图总结
以上是生活随笔为你收集整理的Spring-data-redis集成提交数据出现'maxActive'和‘maxWaitMillis’错误的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 余额宝限额10万怎么办
- 下一篇: Spring添加对缓存的支持