Tag: ehcache

使用Ehcache弹出@Cacheable,spel为有效对象找到null

我有一个类似的问题 ,但有时它的工作原理。 描述的错误只会偶尔发生一次。 我使用的是spring 3.2.5和ehcache 2.6.5。 exception跟踪: org.springframework.expression.spel.SpelEvaluationException: EL1007E:(pos 0): Field or property ‘applicationID’ cannot be found on null at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:213) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85) at org.springframework.expression.spel.ast.PropertyOrFieldReference.access$000(PropertyOrFieldReference.java:43) at org.springframework.expression.spel.ast.PropertyOrFieldReference$AccessorLValue.getValue(PropertyOrFieldReference.java:346) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82) at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:89) at org.springframework.cache.interceptor.ExpressionEvaluator.key(ExpressionEvaluator.java:95) at org.springframework.cache.interceptor.CacheAspectSupport$CacheOperationContext.generateKey(CacheAspectSupport.java:452) at org.springframework.cache.interceptor.CacheAspectSupport.inspectCacheables(CacheAspectSupport.java:281) at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:199) at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:66) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy85.getMailOrigin(Unknown Source) at com.myApplication.MailFilterServiceImpl.isValid(ApplicationServiceImpl.java:134) 我的缓存代码如下: MailFilterServiceImpl @Cacheable(value=”mailClientsCache”, […]

Hibernate缓存策略

如何确定要使用哪个CacheConcurrencyStrategy ? NonstrictReadWriteCache , ReadOnlyCache , ReadWriteCache , TransactionalCache 。 我阅读了https://www.hibernate.org/hib_docs/v3/api/org/hibernate/cache/CacheConcurrencyStrategy.html ,但没有详细解释。