Springboot 集成 Redis
2021-05-06 22:29
标签:返回值 service 集成 boot block ble 更新 return 步骤 操作步骤如下: 此时 t1 = "hello 1"; service.getData1() = "hello 1-1"; 此时 t1 = "hello 1-1"; 结论:@CachePut 数据会更新,@Cacheable 数据不会更新 Springboot 集成 Redis 标签:返回值 service 集成 boot block ble 更新 return 步骤 原文地址:https://www.cnblogs.com/mengjianzhou/p/13187527.html@CachePut 和 @Cacheable 区别
1. t1 t2 都为空值
@CachePut("t1")
public String getData1(){
return service.getData1();
}
@Cacheable("t2")
public String getData1(){
return service.getData2();
}
此时 t2 = "hello 2";2. 修改返回值
service.getData2() = "hello 2-2";
此时 t2 = "hello 2"
上一篇:Java实现的窗口计算器
下一篇:A*算法
文章标题:Springboot 集成 Redis
文章链接:http://soscw.com/index.php/essay/83408.html