Deprecate spring.cache.hazelcast.config
The additional configuration for an `HazelcastInstance` will be removed in 2.0. This commit makes sure that the property is deprecated in 1.5 See gh-8470
This commit is contained in:
@@ -88,6 +88,7 @@ public class CacheProperties {
|
||||
return this.ehcache;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Hazelcast getHazelcast() {
|
||||
return this.hazelcast;
|
||||
}
|
||||
@@ -193,6 +194,7 @@ public class CacheProperties {
|
||||
/**
|
||||
* Hazelcast specific cache properties.
|
||||
*/
|
||||
@Deprecated
|
||||
public static class Hazelcast {
|
||||
|
||||
/**
|
||||
@@ -200,6 +202,9 @@ public class CacheProperties {
|
||||
*/
|
||||
private Resource config;
|
||||
|
||||
@DeprecatedConfigurationProperty(replacement = "spring.hazelcast.config",
|
||||
reason = "Use general hazelcast auto-configuration instead.")
|
||||
@Deprecated
|
||||
public Resource getConfig() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
@@ -451,6 +451,7 @@ public class CacheAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
public void hazelcastCacheWithConfig() throws IOException {
|
||||
load(DefaultCacheConfiguration.class, "spring.cache.type=hazelcast",
|
||||
"spring.cache.hazelcast.config=org/springframework/boot/autoconfigure/cache/hazelcast-specific.xml");
|
||||
@@ -469,6 +470,7 @@ public class CacheAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
public void hazelcastWithWrongConfig() {
|
||||
this.thrown.expect(BeanCreationException.class);
|
||||
this.thrown.expectMessage("foo/bar/unknown.xml");
|
||||
@@ -505,6 +507,7 @@ public class CacheAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Deprecated
|
||||
public void hazelcastCacheWithMainHazelcastAutoConfigurationAndSeparateCacheConfig()
|
||||
throws IOException {
|
||||
String mainConfig = "org/springframework/boot/autoconfigure/hazelcast/hazelcast-specific.xml";
|
||||
|
||||
Reference in New Issue
Block a user