2019年3月13日
摘要: Spring Cache使用方法与Spring对事务管理的配置相似。Spring Cache的核心就是对某 个方法进行缓存,其实质就是缓存该方法的返回结果,并把方法参数和结果用键值对的 方式存放到缓存中,当再次调用该方法使用相应的参数时,就会直接从缓存里面取出指 定的结果进行返回 相比于redis, 阅读全文
posted @ 2019-03-13 20:07 bofeng 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 一、添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> 二、application.ym 阅读全文
posted @ 2019-03-13 19:37 bofeng 阅读(156) 评论(0) 推荐(0) 编辑