Merge branch '2.0.x'

This commit is contained in:
Stephane Nicoll
2018-06-04 14:15:08 +02:00
2 changed files with 26 additions and 4 deletions

View File

@@ -469,6 +469,20 @@ public class CacheAutoConfigurationTests extends AbstractCacheAutoConfigurationT
.hasMessageContaining(configLocation));
}
@Test
public void jCacheCacheUseBeanClassLoader() {
String cachingProviderFqn = MockCachingProvider.class.getName();
this.contextRunner.withUserConfiguration(DefaultCacheConfiguration.class)
.withPropertyValues("spring.cache.type=jcache",
"spring.cache.jcache.provider=" + cachingProviderFqn)
.run((context) -> {
JCacheCacheManager cacheManager = getCacheManager(context,
JCacheCacheManager.class);
assertThat(cacheManager.getCacheManager().getClassLoader())
.isEqualTo(context.getClassLoader());
});
}
@Test
public void hazelcastCacheExplicit() {
this.contextRunner