@Override protected void useCachingConfigurer(CachingConfigurer config) { super.useCachingConfigurer(config); if (config instanceof JCacheConfigurer) { this.exceptionCacheResolver = ((JCacheConfigurer) config)::exceptionCacheResolver; } }
@Override protected void useCachingConfigurer(CachingConfigurer config) { super.useCachingConfigurer(config); if (config instanceof JCacheConfigurer) { this.exceptionCacheResolver = ((JCacheConfigurer) config)::exceptionCacheResolver; } }
@Autowired(required = false) void setConfigurers(Collection<CachingConfigurer> configurers) { if (CollectionUtils.isEmpty(configurers)) { return; } if (configurers.size() > 1) { throw new IllegalStateException(configurers.size() + " implementations of " + "CachingConfigurer were found when only 1 was expected. " + "Refactor the configuration such that CachingConfigurer is " + "implemented only once or not at all."); } CachingConfigurer configurer = configurers.iterator().next(); useCachingConfigurer(configurer); }
@Autowired(required = false) void setConfigurers(Collection<CachingConfigurer> configurers) { if (CollectionUtils.isEmpty(configurers)) { return; } if (configurers.size() > 1) { throw new IllegalStateException(configurers.size() + " implementations of " + "CachingConfigurer were found when only 1 was expected. " + "Refactor the configuration such that CachingConfigurer is " + "implemented only once or not at all."); } CachingConfigurer configurer = configurers.iterator().next(); useCachingConfigurer(configurer); }
@Override protected void useCachingConfigurer(CachingConfigurer config) { super.useCachingConfigurer(config); if (config instanceof JCacheConfigurer) { this.exceptionCacheResolver = ((JCacheConfigurer) config).exceptionCacheResolver(); } }
@Autowired(required = false) void setConfigurers(Collection<CachingConfigurer> configurers) { if (CollectionUtils.isEmpty(configurers)) { return; } if (configurers.size() > 1) { throw new IllegalStateException(configurers.size() + " implementations of " + "CachingConfigurer were found when only 1 was expected. " + "Refactor the configuration such that CachingConfigurer is " + "implemented only once or not at all."); } CachingConfigurer configurer = configurers.iterator().next(); useCachingConfigurer(configurer); }