mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Merge branch '2.6.x' into 2.7.x
Closes gh-31883
This commit is contained in:
commit
53a652ec65
@ -5,7 +5,7 @@
|
|||||||
<map name="defaultCache" />
|
<map name="defaultCache" />
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false"/>
|
<auto-detection enabled="false"/>
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<map name="defaultCache" />
|
<map name="defaultCache" />
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false"/>
|
<auto-detection enabled="false"/>
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.hazelcast;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.hazelcast.config.Config;
|
import com.hazelcast.config.Config;
|
||||||
|
import com.hazelcast.config.JoinConfig;
|
||||||
import com.hazelcast.config.QueueConfig;
|
import com.hazelcast.config.QueueConfig;
|
||||||
import com.hazelcast.core.Hazelcast;
|
import com.hazelcast.core.Hazelcast;
|
||||||
import com.hazelcast.core.HazelcastInstance;
|
import com.hazelcast.core.HazelcastInstance;
|
||||||
@ -138,7 +139,7 @@ class HazelcastAutoConfigurationServerTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void configInstanceWithName() {
|
void configInstanceWithName() {
|
||||||
Config config = new Config("my-test-instance");
|
Config config = createTestConfig("my-test-instance");
|
||||||
HazelcastInstance existing = Hazelcast.newHazelcastInstance(config);
|
HazelcastInstance existing = Hazelcast.newHazelcastInstance(config);
|
||||||
try {
|
try {
|
||||||
this.contextRunner.withUserConfiguration(HazelcastConfigWithName.class)
|
this.contextRunner.withUserConfiguration(HazelcastConfigWithName.class)
|
||||||
@ -205,6 +206,14 @@ class HazelcastAutoConfigurationServerTests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Config createTestConfig(String instanceName) {
|
||||||
|
Config config = new Config(instanceName);
|
||||||
|
JoinConfig join = config.getNetworkConfig().getJoin();
|
||||||
|
join.getAutoDetectionConfig().setEnabled(false);
|
||||||
|
join.getMulticastConfig().setEnabled(false);
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
static class HazelcastConfigWithName {
|
static class HazelcastConfigWithName {
|
||||||
|
|
||||||
@ -220,7 +229,7 @@ class HazelcastAutoConfigurationServerTests {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
Config anotherHazelcastConfig() {
|
Config anotherHazelcastConfig() {
|
||||||
Config config = new Config();
|
Config config = createTestConfig("another-test-instance");
|
||||||
config.addQueueConfig(new QueueConfig("another-queue"));
|
config.addQueueConfig(new QueueConfig("another-queue"));
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<map name="defaultCache" />
|
<map name="defaultCache" />
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false" />
|
<auto-detection enabled="false" />
|
||||||
<multicast enabled="false" />
|
<multicast enabled="false" />
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
hazelcast:
|
hazelcast:
|
||||||
network:
|
network:
|
||||||
join:
|
join:
|
||||||
|
auto-detection:
|
||||||
|
enabled: false
|
||||||
multicast:
|
multicast:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false"/>
|
<auto-detection enabled="false" />
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
hazelcast:
|
hazelcast:
|
||||||
network:
|
network:
|
||||||
join:
|
join:
|
||||||
|
auto-detection:
|
||||||
|
enabled: false
|
||||||
multicast:
|
multicast:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false"/>
|
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -7,8 +7,8 @@ description = "Spring Boot Hazelcast 4 smoke test"
|
|||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
resolutionStrategy {
|
resolutionStrategy {
|
||||||
force "com.hazelcast:hazelcast:4.0.5"
|
force "com.hazelcast:hazelcast:4.2.5"
|
||||||
force "com.hazelcast:hazelcast-spring:4.0.5"
|
force "com.hazelcast:hazelcast-spring:4.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
|
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-4.0.xsd">
|
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-4.2.xsd">
|
||||||
<map name="countries">
|
<map name="countries">
|
||||||
<time-to-live-seconds>600</time-to-live-seconds>
|
<time-to-live-seconds>600</time-to-live-seconds>
|
||||||
</map>
|
</map>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
<tcp-ip enabled="false"/>
|
<auto-detection enabled="false" />
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
|
<hazelcast xmlns="http://www.hazelcast.com/schema/config"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.hazelcast.com/schema/config
|
xsi:schemaLocation="http://www.hazelcast.com/schema/config
|
||||||
http://www.hazelcast.com/schema/config/hazelcast-config-4.0.xsd">
|
http://www.hazelcast.com/schema/config/hazelcast-config-4.2.xsd">
|
||||||
|
|
||||||
<map name="spring:session:sessions">
|
<map name="spring:session:sessions">
|
||||||
<attributes>
|
<attributes>
|
||||||
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<network>
|
<network>
|
||||||
<join>
|
<join>
|
||||||
|
<auto-detection enabled="false"/>
|
||||||
<multicast enabled="false"/>
|
<multicast enabled="false"/>
|
||||||
</join>
|
</join>
|
||||||
</network>
|
</network>
|
||||||
|
Loading…
Reference in New Issue
Block a user