• Stephane Nicoll's avatar
    Fix Hazelcast Cache auto-configuration ordering · 094f7aa2
    Stephane Nicoll authored
    Spring Boot supports the automatic configuration of an additional
    HazelcastInstance if one already exists and an explicit property has been
    set to use a different configuration for caching. So three cases are
    supported really: no `HazelcastInstance` exists so we need to create one
    anyway or an `HazelcastInstance` already exists; in that latter case, we
    should either reuse it or create a new one.
    
    Unfortunately, the conditions that checked those three use cases were
    not ordered consistently and we could easily get in a situation where
    both conditions were evaluated.
    
    This commit makes sure that we  first check if an `HazelcastInstance`
    exists and then (and only then) we create the missing `HazelcastInstance`
    used for caching. The tests have also been improved to validate the
    proper `HazelcastInstance` is used for caching.
    
    Closes gh-5181
    094f7aa2
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...