Lazily resolve the default exception CacheResolver

This is a rework of 314b069 that may still lead to issue if a Cacheable
annotated bean is inspected on startup. Instead of resolving the default
exception CacheResolver if a cache operation is parsed, we resolve it as
late as possible (i.e. when an exception is thrown and the relevant
exception cache needs to be resolved)

Issue: SPR-12850
This commit is contained in:
Stephane Nicoll
2015-03-27 09:42:06 +01:00
parent 867971de89
commit a7fec6a459
2 changed files with 31 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ public class JCacheJavaConfigTests extends AbstractJCacheAnnotationTests {
}
@Test
public void exceptionCacheResolverFallbacksToMainOne() {
public void exceptionCacheResolverLazilyRequired() {
ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(
NoExceptionCacheResolverConfig.class);
try {