2018年7月24日
摘要: 1、编写redis.properties配置文件 2.配置spring-redis-cluster.xml文件 3、编写SpringBeanFactoryUtils类,再在application-context.xml或spring-redis-cluster.xml文件中引入,快速获取一个bean 阅读全文
posted @ 2018-07-24 18:07 依米欧 阅读(2515) 评论(0) 推荐(1) 编辑
摘要: 对于查询比较多的项目可以考虑配置二级缓存,mybatis本身的二级缓存是缓存到本地,但是对于多个节点的项目来说,可能会出现数据不一致的问题,所以采用redis缓存,这样二级缓存的数据就可以缓存到内存,可实现多个节点项目的数据同步。 1、配置redis的连接 2、配置mybatis-cache-con 阅读全文
posted @ 2018-07-24 17:57 依米欧 阅读(390) 评论(0) 推荐(0) 编辑