首页

SpringBoot的Redis的@Cacheable注解两种方式完整项目demo示例

标签:@Cacheable注解,redis缓存     发布时间:2022-09-21   
  • 云盘下载:
  • [提取码:coy2]
       ( 需积分:4  )

一、下载说明

如下图,下载项目后配置maven的setting文件,@Cacheable注解和org.springframework.cache.Cache代码配置参考,启动配置redis mysql服务,运行RedisDemoApplication启动类。

SpringBoot的Redis的@Cacheable注解两种方式完整项目demo示例

1)cacheManage代码缓存测试接口 - http://localhost:8888/user/111

{"userId":111,"username":"test"}

2)@Cacheable注解方式接口 - http://localhost:8888/user/ca/111

{"userId":111,"username":"test"}
@b@
  • ◆ 相关内容