摘要: @Autowiredprivate StringRedisTemplate stringRedisTemplate; public SeckillUser getSeckillUser(long id) { //查redis缓存 String seckillGoods = stringRedisTe 阅读全文
posted @ 2020-07-30 15:58 neona 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 分级缓存 第一级缓存:项目JVM本地内存(本地热点缓存) 第二级缓存:Redis缓存 第三级缓存:数据库 本地热点缓存实现:要使用的是Guava cache组件 guava是开源java 库。是由谷歌公司研发。 这个库主要是为了方便编码,并且减少编码错误。 这个库用于集合 缓存 并发性 常用注解 字 阅读全文
posted @ 2020-07-30 09:11 neona 阅读(499) 评论(0) 推荐(0) 编辑
摘要: @GetMapping(value = "findAll", produces = "text/html") @ResponseBody public String findAll(HttpServletRequest request, HttpServletResponse response, M 阅读全文
posted @ 2020-07-30 08:56 neona 阅读(214) 评论(0) 推荐(0) 编辑