易错点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(自定义)”这个属性。

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-05-28
  • 2021-11-14
  • 2021-12-21
  • 2021-04-04
  • 2021-04-18
  • 2021-06-06
猜你喜欢
  • 2021-07-01
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案