现在我想要使用一个固定的字符串作为Key,类似于下面的例子,但是会报SpEL解析错误
@Cached(area = "test", name = "name", key = "key1")
public Response getResponse(){
}
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'key1' cannot be found on object of type 'com.alicp.jetcache.anno.method.SpringCacheInvokeContext' - maybe not public or not valid
2条答案
按热度按时间zynd9foi1#
spel可以输出常量
key="'key1'"
tkqqtvp12#
好的,感谢