jetcache @Cached 能否自定义Key,不使用Spel表达式

dddzy1tm  于 22天前  发布在  其他
关注(0)|答案(2)|浏览(17)

现在我想要使用一个固定的字符串作为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

相关问题