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

【原】Spring整合Redis(第三篇)—盘点SDR搭建中易出现的错误

2016-08-23 19:45 453 查看
易错点01:Spring版本过低导致的错误
【环境参数】
Redis版本:redis-2.4.5-win32-win64
Spring原来的版本:4.1.7.RELEASE
Spring修改后的版本:4.2.6.RELEASE

【障碍描述】
Question:NoSuchMethodError
Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
org.springframework.core.serializer.support.DeserializingConverter.<init>(Ljava/lang/ClassLoader;)V

【原因分析】
原因:Spring的版本过低
在SDR的官网中,有如下一段描述:
Spring Data Redis 1.x binaries requires JDK level 6.0 and above, and Spring Framework 4.2.6.RELEASE and above.

参考连接: http://coding84.com/article/24274915611907308.html http://docs.spring.io/spring-data/redis/docs/1.7.2.RELEASE/reference/html/

易错点02:设置redis的数据库Index
Redis默认有16个数据库,在配置文件中,设置Redis需要使用的哪个Redis数据库,应该使用属性“database”,而不是“dbIndex(自定义)”这个属性。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: