love_gzd
NGU_ALLIN
采纳率0%
2019-04-10 10:46 阅读 568

mybatis 二级缓存集成 redis的问题

mybatis 集成了二级缓存,正常都是可以使用的,但是把redis 服务停了,
查询就不好使了,报异常

nested exception is org.apache.ibatis.exceptions.PersistenceException: \n### Error querying database.  Cause: org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused (Connection refused)\n### Cause: org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused (Connection refused)

个人理解,缓存不好使,正常来说不应该查询数据库么?求大牛给指导一下!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • weixin_45353423 weixin_45353423 2020-06-03 10:42

    他是先查redis没有再查数据库;除非你自己做了优化

    点赞 评论 复制链接分享

相关推荐