Merge pull request #3962 from izeye/hazelcast

* pr/3962:
  Remove duplicate `@ConditionalOnMissingBean` checks.
pull/3986/merge
Phillip Webb 9 years ago
commit a63ec53d2b

@ -49,7 +49,7 @@ import com.hazelcast.core.HazelcastInstance;
public class HazelcastAutoConfiguration { public class HazelcastAutoConfiguration {
@Configuration @Configuration
@ConditionalOnMissingBean({ HazelcastInstance.class, Config.class }) @ConditionalOnMissingBean(Config.class)
@Conditional(ConfigAvailableCondition.class) @Conditional(ConfigAvailableCondition.class)
static class HazelcastConfigFileConfiguration { static class HazelcastConfigFileConfiguration {
@ -57,7 +57,6 @@ public class HazelcastAutoConfiguration {
private HazelcastProperties hazelcastProperties; private HazelcastProperties hazelcastProperties;
@Bean @Bean
@ConditionalOnMissingBean
public HazelcastInstance hazelcastInstance() throws IOException { public HazelcastInstance hazelcastInstance() throws IOException {
Resource config = this.hazelcastProperties.resolveConfigLocation(); Resource config = this.hazelcastProperties.resolveConfigLocation();
if (config != null) { if (config != null) {
@ -69,7 +68,6 @@ public class HazelcastAutoConfiguration {
} }
@Configuration @Configuration
@ConditionalOnMissingBean(HazelcastInstance.class)
@ConditionalOnSingleCandidate(Config.class) @ConditionalOnSingleCandidate(Config.class)
static class HazelcastConfigConfiguration { static class HazelcastConfigConfiguration {

Loading…
Cancel
Save