标签:返回值 service 集成 boot block ble 更新 return 步骤
操作步骤如下:
@CachePut("t1")
public String getData1(){
return service.getData1();
}
@Cacheable("t2")
public String getData1(){
return service.getData2();
}
此时 t1 = "hello 1";
此时 t2 = "hello 2";
service.getData1() = "hello 1-1";
service.getData2() = "hello 2-2";
此时 t1 = "hello 1-1";
此时 t2 = "hello 2"
结论:@CachePut 数据会更新,@Cacheable 数据不会更新
标签:返回值 service 集成 boot block ble 更新 return 步骤
原文地址:https://www.cnblogs.com/mengjianzhou/p/13187527.html