java是否可以在@Cacheable注释中使用枚举值作为#键?
我想这样做:
@Cacheable(cacheNames = "cahcedDataCOllection", cacheManager = "cacheManagerInMemory", key="#request.enum.value")
public MyProto.GetSomethingResponse getSomething(MyProto.GetSomethingRequest request) {
...
}
这对任何对象属性都非常有效,但我在使用enum时遇到了一个问题
也许这很重要:
请求/响应对象是protobuf生成的java代码
共 (0) 个答案