在Microsoft WindowsServer 2008 R2上运行的Eclipse Indigo Service Release 2。现在,我想为所有用户将“ New File Line Delimiter”设置为Unix(或为所有工作空间设置为默认值)。
我们应该怎么做?
如果我为没有任何参数的方法定义了一个ehcache.
但在我的用例中,我需要通过它的密钥访问我构建的缓存.
所以请为我提供更好的方法来分配密钥.
关注是我的代码:
@Override
@Cacheable(value = "cacheName", key = "cacheKey")
public List<String> getCacheMethod() throws Exception{
Run Code Online (Sandbox Code Playgroud)
PS当我尝试从其他地方访问此方法时,我收到以下错误.
org.springframework.expression.spel.SpelEvaluationException:EL1008E:(pos 0):在'org.springframework.cache.interceptor.CacheExpressionRootObject'类型的对象上找不到字段或属性'cacheKey'