Replace anonymous class with lambda

This commit is contained in:
Oscar Utbult 2016-11-30 20:56:03 +01:00 committed by Dave Syer
parent 87ee7cadfb
commit 706c6fc647

View file

@ -27,9 +27,7 @@ class CacheConfig {
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return new JCacheManagerCustomizer() {
@Override
public void customize(CacheManager cacheManager) {
return cacheManager -> {
CacheConfiguration<Object, Object> config = CacheConfigurationBuilder
.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.newResourcePoolsBuilder()
@ -37,7 +35,6 @@ class CacheConfig {
.withExpiry(Expirations.timeToLiveExpiration(Duration.of(60, TimeUnit.SECONDS)))
.build();
cacheManager.createCache("vets", Eh107Configuration.fromEhcacheCacheConfiguration(config));
}
};
}