camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject camel git commit: camel-atomix: improve spring boot conditions
Date Tue, 26 Sep 2017 14:31:16 GMT
Repository: camel
Updated Branches:
  refs/heads/master 0620b0772 -> cf77381a4


camel-atomix: improve spring boot conditions


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cf77381a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cf77381a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cf77381a

Branch: refs/heads/master
Commit: cf77381a441c9573f58dccc7ff3dcb57238e21d1
Parents: 0620b07
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Tue Sep 26 16:30:35 2017 +0200
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Tue Sep 26 16:31:11 2017 +0200

----------------------------------------------------------------------
 .../ha/springboot/AtomixClusterServiceAutoConfiguration.java      | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cf77381a/platforms/spring-boot/components-starter/camel-atomix-starter/src/main/java/org/apache/camel/component/atomix/ha/springboot/AtomixClusterServiceAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-atomix-starter/src/main/java/org/apache/camel/component/atomix/ha/springboot/AtomixClusterServiceAutoConfiguration.java
b/platforms/spring-boot/components-starter/camel-atomix-starter/src/main/java/org/apache/camel/component/atomix/ha/springboot/AtomixClusterServiceAutoConfiguration.java
index 7d7c6cd..286918f 100644
--- a/platforms/spring-boot/components-starter/camel-atomix-starter/src/main/java/org/apache/camel/component/atomix/ha/springboot/AtomixClusterServiceAutoConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-atomix-starter/src/main/java/org/apache/camel/component/atomix/ha/springboot/AtomixClusterServiceAutoConfiguration.java
@@ -30,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.condition.AllNestedConditions;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
@@ -48,6 +49,7 @@ public class AtomixClusterServiceAutoConfiguration {
     @Bean(initMethod = "start", destroyMethod = "stop")
     @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
     @ConditionalOnProperty(prefix = "camel.component.atomix.cluster.service", name = "mode",
havingValue = "node")
+    @ConditionalOnMissingBean
     public CamelClusterService atomixClusterService() {
         AtomixClusterService service = new AtomixClusterService();
         service.setNodes(configuration.getNodes().stream().map(Address::new).collect(Collectors.toList()));
@@ -65,6 +67,7 @@ public class AtomixClusterServiceAutoConfiguration {
     @Bean(initMethod = "start", destroyMethod = "stop")
     @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
     @ConditionalOnProperty(prefix = "camel.component.atomix.cluster.service", name = "mode",
havingValue = "client")
+    @ConditionalOnMissingBean
     public CamelClusterService atomixClusterClientService() {
         AtomixClusterClientService service = new AtomixClusterClientService();
         service.setNodes(configuration.getNodes().stream().map(Address::new).collect(Collectors.toList()));


Mime
View raw message