This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit aa37c455a1a5750ca357f9e4d0999b6746d37039
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Jun 7 10:07:00 2020 +0200

    came-health - Spring Boot. WIP
---
 .../src/main/docs/spring-boot.adoc                 | 10 ++-
 ...java => CamelHealthCheckAutoConfiguration.java} | 20 ++---
 .../CamelHealthCheckConfigurationProperties.java   | 90 ++++++++++++++++++++++
 ...dicator.java => CamelHealthCheckIndicator.java} | 52 +++++++------
 .../health/AbstractHealthCheckConfiguration.java   | 49 ------------
 .../health/HealthCheckRoutesAutoConfiguration.java | 61 ---------------
 .../health/HealthCheckRoutesConfiguration.java     | 36 ---------
 .../health/HealthCheckVerboseConfiguration.java    | 36 ---------
 .../spring/boot/health/HealthConfiguration.java    | 35 ---------
 .../camel/spring/boot/health/HealthConstants.java  | 24 ------
 .../src/main/resources/META-INF/spring.factories   |  3 +-
 .../boot/actuate/health/CamelHealthTest.java       | 12 +--
 12 files changed, 135 insertions(+), 293 deletions(-)

diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.adoc 
b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
index 4532a2a..bac61a1 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.adoc
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.adoc
@@ -92,7 +92,7 @@ When using spring-boot with Spring Boot make sure to use the 
following Maven dep
 ----
 
 
-The component supports 127 options, which are listed below.
+The component supports 129 options, which are listed below.
 
 
 
@@ -136,8 +136,11 @@ The component supports 127 options, which are listed below.
 | *camel.component.properties.properties-parser* | To use a custom 
PropertiesParser. The option is a 
org.apache.camel.component.properties.PropertiesParser type. |  | String
 | *camel.component.properties.system-properties-mode* | Sets the JVM system 
property mode (0 = never, 1 = fallback, 2 = override). The default mode 
(override) is to use system properties if present, and override any existing 
properties. OS environment variable mode is checked before JVM system property 
mode | 2 | Integer
 | *camel.dataformat.enabled* | Global option to enable/disable dataformat 
auto-configuration, default is true. | true | Boolean
-| *camel.health.check.routes.enabled* | Global option to enable/disable Camel 
extended health check for routes, default is false. | false | Boolean
-| *camel.health.enabled* | Global option to enable/disable camel health bean, 
default is true. | true | Boolean
+| *camel.health.context-enabled* | Option to enable/disable context 
health-check. | true | Boolean
+| *camel.health.enabled* | Global option to enable/disable Camel health check. 
| true | Boolean
+| *camel.health.parameters* | Extended configuration for routes, registry or 
custom health checks |  | Map
+| *camel.health.registry-enabled* | Option to enable/disable registry 
health-check. | true | Boolean
+| *camel.health.routes-enabled* | Option to enable/disable routes 
health-check. | true | Boolean
 | *camel.language.enabled* | Global option to enable/disable language 
auto-configuration, default is true. | true | Boolean
 | *camel.springboot.allow-use-original-message* | Sets whether to allow access 
to the original message from Camel's error handler, or from 
org.apache.camel.spi.UnitOfWork.getOriginalInMessage(). Turning this off can 
optimize performance, as defensive copy of the original message is not needed. 
Default is false. | false | Boolean
 | *camel.springboot.auto-startup* | Sets whether the object should 
automatically start when Camel starts. Important: Currently only routes can be 
disabled, as CamelContext's are always started. Note: When setting auto startup 
false on CamelContext then that takes precedence and no routes is started. You 
would need to start CamelContext explicit using the 
org.apache.camel.CamelContext.start() method, to start the context, and then 
you would need to start the routes manually using Camelcon [...]
@@ -225,7 +228,6 @@ The component supports 127 options, which are listed below.
 | *camel.ssl.session-timeout* | The optional SSLSessionContext timeout time 
for javax.net.ssl.SSLSession in seconds. |  | String
 | *camel.ssl.trust-managers* | The optional trust manager configuration for 
creating the TrustManager used in constructing an SSLContext. |  | 
TrustManagersParameters
 | *management.info.camel.enabled* | Whether to enable Camel info. | true | 
Boolean
-| *management.info.camel.verbose* | Global option to enable/disable  health 
bean camel version info, default is true. | true | Boolean
 |===
 // spring-boot-auto-configure options: END
 
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthAutoConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
similarity index 73%
rename from 
core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthAutoConfiguration.java
rename to 
core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
index 1cf2f43..7f3b69c 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthAutoConfiguration.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckAutoConfiguration.java
@@ -18,7 +18,6 @@ package org.apache.camel.spring.boot.actuate.health;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
-import org.apache.camel.spring.boot.health.HealthCheckVerboseConfiguration;
 import org.springframework.boot.actuate.health.HealthIndicator;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
@@ -31,23 +30,18 @@ import org.springframework.context.annotation.Configuration;
 @Configuration(proxyBeanMethods = false)
 @ConditionalOnClass({HealthIndicator.class})
 @ConditionalOnBean(CamelAutoConfiguration.class)
+@EnableConfigurationProperties(CamelHealthCheckConfigurationProperties.class)
 @AutoConfigureAfter(CamelAutoConfiguration.class)
-@EnableConfigurationProperties(HealthCheckVerboseConfiguration.class)
-public class CamelHealthAutoConfiguration {
-
-    private HealthCheckVerboseConfiguration properties;
-
-    public CamelHealthAutoConfiguration(HealthCheckVerboseConfiguration 
configuration) {
-        this.properties = configuration;
-    }
+public class CamelHealthCheckAutoConfiguration {
 
     @ConditionalOnClass({CamelContext.class})
-    @ConditionalOnMissingBean(CamelHealthIndicator.class)
-    protected class CamelHealthIndicatorInitializer {
+    @ConditionalOnMissingBean(CamelHealthCheckIndicator.class)
+    protected class CamelHealthCheckIndicatorInitializer {
 
         @Bean
-        public HealthIndicator camelHealthIndicator(CamelContext camelContext) 
{
-            return new CamelHealthIndicator(camelContext, properties);
+        public HealthIndicator camelHealthCheckIndicator(CamelContext 
camelContext, CamelHealthCheckConfigurationProperties configuration) {
+            // TODO: use configuration to configure health-check
+            return new CamelHealthCheckIndicator(camelContext);
         }
 
     }
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java
new file mode 100644
index 0000000..0e0bd98
--- /dev/null
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckConfigurationProperties.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.boot.actuate.health;
+
+import java.util.Map;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "camel.health")
+public class CamelHealthCheckConfigurationProperties {
+
+    /**
+     * Global option to enable/disable Camel health check.
+     */
+    private boolean enabled = true;
+
+    /**
+     * Option to enable/disable context health-check.
+     */
+    private boolean contextEnabled = true;
+
+    /**
+     * Option to enable/disable routes health-check.
+     */
+    private boolean routesEnabled = true;
+
+    /**
+     * Option to enable/disable registry health-check.
+     */
+    private boolean registryEnabled = true;
+
+    /**
+     * Extended configuration for routes, registry or custom health checks
+     */
+    private Map<String, String> parameters;
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public boolean isContextEnabled() {
+        return contextEnabled;
+    }
+
+    public void setContextEnabled(boolean contextEnabled) {
+        this.contextEnabled = contextEnabled;
+    }
+
+    public boolean isRoutesEnabled() {
+        return routesEnabled;
+    }
+
+    public void setRoutesEnabled(boolean routesEnabled) {
+        this.routesEnabled = routesEnabled;
+    }
+
+    public boolean isRegistryEnabled() {
+        return registryEnabled;
+    }
+
+    public void setRegistryEnabled(boolean registryEnabled) {
+        this.registryEnabled = registryEnabled;
+    }
+
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, String> parameters) {
+        this.parameters = parameters;
+    }
+}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthIndicator.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckIndicator.java
similarity index 53%
rename from 
core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthIndicator.java
rename to 
core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckIndicator.java
index ff60ea4..018d672 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthIndicator.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/health/CamelHealthCheckIndicator.java
@@ -16,8 +16,13 @@
  */
 package org.apache.camel.spring.boot.actuate.health;
 
+import java.util.Collection;
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
-import org.apache.camel.spring.boot.health.HealthCheckVerboseConfiguration;
+import org.apache.camel.health.HealthCheck;
+import org.apache.camel.health.HealthCheckHelper;
+import org.apache.camel.impl.health.AbstractHealthCheck;
 import org.springframework.boot.actuate.health.AbstractHealthIndicator;
 import org.springframework.boot.actuate.health.Health;
 import org.springframework.boot.actuate.health.HealthIndicator;
@@ -25,37 +30,38 @@ import 
org.springframework.boot.actuate.health.HealthIndicator;
 /**
  * Camel {@link HealthIndicator}.
  */
-public class CamelHealthIndicator extends AbstractHealthIndicator {
+public class CamelHealthCheckIndicator extends AbstractHealthIndicator {
 
     private final CamelContext camelContext;
-    private final HealthCheckVerboseConfiguration properties;
 
-    public CamelHealthIndicator(CamelContext camelContext, 
HealthCheckVerboseConfiguration properties) {
+    public CamelHealthCheckIndicator(CamelContext camelContext) {
         this.camelContext = camelContext;
-        this.properties = properties;
     }
 
     @Override
     protected void doHealthCheck(Health.Builder builder) throws Exception {
-        if (camelContext == null) {
-            builder.unknown();
-        } else {
-            if (properties.isVerbose()) {
-                builder.withDetail("name", camelContext.getName());
-                builder.withDetail("version", camelContext.getVersion());
-            }
-            if (camelContext.getUptime() != null) {
-                builder.withDetail("uptime", camelContext.getUptime());
-                builder.withDetail("uptimeMillis", 
camelContext.getUptimeMillis());
-            }
-            builder.withDetail("status", camelContext.getStatus().name());
-            if (camelContext.getStatus().isStarted()) {
-                builder.up();
-            } else if (camelContext.getStatus().isStopped()) {
-                builder.down();
-            } else {
-                builder.unknown();
+        builder.withDetail("name", "camel-health-check");
+        builder.up();
+
+        if (camelContext != null) {
+            Collection<HealthCheck.Result> results = 
HealthCheckHelper.invoke(camelContext);
+
+            for (HealthCheck.Result result : results) {
+                Map<String, Object> details = result.getDetails();
+                boolean enabled = true;
+
+                if (details.containsKey(AbstractHealthCheck.CHECK_ENABLED)) {
+                    enabled = (boolean) 
details.get(AbstractHealthCheck.CHECK_ENABLED);
+                }
+
+                if (enabled) {
+                    builder.withDetail(result.getCheck().getId(), 
result.getState().name());
+                    if (result.getState() == HealthCheck.State.DOWN) {
+                        builder.down();
+                    }
+                }
             }
         }
     }
+
 }
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/AbstractHealthCheckConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/AbstractHealthCheckConfiguration.java
deleted file mode 100644
index 09304f0..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/AbstractHealthCheckConfiguration.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-import org.apache.camel.health.HealthCheckConfiguration;
-
-public abstract class AbstractHealthCheckConfiguration {
-    /**
-     * Set if the check associated to this configuration is enabled or not.
-     */
-    private Boolean enabled;
-
-    /**
-     * Set if the check associated to this configuration is enabled or not.
-     */
-    public Boolean isEnabled() {
-        return enabled;
-    }
-
-    /**
-     * Set if the check associated to this configuration is enabled or not.
-     */
-    public void setEnabled(Boolean enabled) {
-        this.enabled = enabled;
-    }
-
-    /**
-     * Convert this configuration to a {@link HealthCheckConfiguration} using 
default values.
-     */
-    public HealthCheckConfiguration asHealthCheckConfiguration() {
-        return HealthCheckConfiguration.builder()
-            .enabled(this.isEnabled())
-            .build();
-    }
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
deleted file mode 100644
index e9fc712..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-import org.apache.camel.health.HealthCheckRepository;
-import org.apache.camel.impl.health.RoutesHealthCheckRepository;
-import org.apache.camel.spring.boot.CamelAutoConfiguration;
-import org.apache.camel.spring.boot.util.GroupCondition;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.boot.autoconfigure.AutoConfigureBefore;
-import 
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-
-@Configuration(proxyBeanMethods = false)
-@AutoConfigureBefore(CamelAutoConfiguration.class)
-@Conditional(HealthCheckRoutesAutoConfiguration.Condition.class)
-@EnableConfigurationProperties(HealthCheckRoutesConfiguration.class)
-public class HealthCheckRoutesAutoConfiguration {
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
-    @ConditionalOnMissingBean(RoutesHealthCheckRepository.class)
-    public HealthCheckRepository 
routesHealthCheckRepository(HealthCheckRoutesConfiguration configuration) {
-        if (configuration.isEnabled()) {
-            return new RoutesHealthCheckRepository();
-        } else {
-            return null;
-        }
-    }
-
-    // ***************************************
-    // Condition
-    // ***************************************
-
-    public static class Condition extends GroupCondition {
-        public Condition() {
-            super(
-                HealthConstants.HEALTH_PREFIX,
-                HealthConstants.HEALTH_CHECK_ROUTES_PREFIX
-            );
-        }
-    }
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesConfiguration.java
deleted file mode 100644
index 09e3248..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesConfiguration.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-@ConfigurationProperties(prefix = HealthConstants.HEALTH_CHECK_ROUTES_PREFIX)
-public class HealthCheckRoutesConfiguration {
-    /**
-     * Global option to enable/disable Camel extended health check for routes, 
default is false.
-     */
-    private boolean enabled;
-
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckVerboseConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckVerboseConfiguration.java
deleted file mode 100644
index 85c7985..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckVerboseConfiguration.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-// TODO: Move to actuate/health
-@ConfigurationProperties("management.info.camel")
-public class HealthCheckVerboseConfiguration {
-    /**
-     * Global option to enable/disable  health bean camel version info, 
default is true.
-     */
-    private boolean verbose = true;
-
-    public boolean isVerbose() {
-        return verbose;
-    }
-    
-    public void setVerbose(boolean verbose) {
-        this.verbose = verbose;
-    }
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConfiguration.java
deleted file mode 100644
index b2027a3..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConfiguration.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-@ConfigurationProperties(prefix = HealthConstants.HEALTH_PREFIX)
-public class HealthConfiguration {
-    /**
-     * Global option to enable/disable camel health bean, default is true.
-     */
-    private boolean enabled = true;
-
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-}
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConstants.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConstants.java
deleted file mode 100644
index 43edb1f..0000000
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthConstants.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.boot.health;
-
-public interface HealthConstants {
-    String HEALTH_PREFIX = "camel.health";
-    String HEALTH_INDICATOR_PREFIX = "camel.health.indicator";
-    String HEALTH_CHECK_INDICATOR_PREFIX = "camel.health.check.indicator";
-    String HEALTH_CHECK_ROUTES_PREFIX = "camel.health.check.routes";
-}
diff --git 
a/core/camel-spring-boot/src/main/resources/META-INF/spring.factories 
b/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
index 2bdc3a0..5555e22 100644
--- a/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
+++ b/core/camel-spring-boot/src/main/resources/META-INF/spring.factories
@@ -33,7 +33,7 @@
 
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
 org.apache.camel.spring.boot.CamelAutoConfiguration,\
-org.apache.camel.spring.boot.actuate.health.CamelHealthAutoConfiguration,\
+org.apache.camel.spring.boot.actuate.health.CamelHealthCheckAutoConfiguration,\
 org.apache.camel.spring.boot.actuate.info.CamelInfoAutoConfiguration,\
 org.apache.camel.spring.boot.cloud.CamelCloudAutoConfiguration,\
 
org.apache.camel.spring.boot.cloud.CamelCloudServiceCallConfigurationAutoConfiguration,\
@@ -41,7 +41,6 @@ 
org.apache.camel.spring.boot.cloud.CamelCloudServiceDiscoveryAutoConfiguration,\
 org.apache.camel.spring.boot.cloud.CamelCloudServiceFilterAutoConfiguration,\
 org.apache.camel.spring.boot.cloud.CamelCloudServiceChooserAutoConfiguration,\
 
org.apache.camel.spring.boot.cluster.ClusteredRouteControllerAutoConfiguration,\
-org.apache.camel.spring.boot.health.HealthCheckRoutesAutoConfiguration, \
 org.apache.camel.spring.boot.properties.PropertiesComponentAutoConfiguration,\
 org.apache.camel.spring.boot.security.CamelSSLAutoConfiguration
 
diff --git 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/health/CamelHealthTest.java
 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/health/CamelHealthTest.java
index c2a77d5..fe45c61 100644
--- 
a/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/health/CamelHealthTest.java
+++ 
b/core/camel-spring-boot/src/test/java/org/apache/camel/spring/boot/actuate/health/CamelHealthTest.java
@@ -32,13 +32,11 @@ import org.springframework.test.context.junit4.SpringRunner;
 @EnableAutoConfiguration
 @SpringBootApplication
 @SpringBootTest(
-    classes = {CamelAutoConfiguration.class, 
CamelHealthAutoConfiguration.class, MyCamelRoute.class},
-    properties = {"management.info.camel.verbose = true"}
-    )
+    classes = {CamelAutoConfiguration.class, 
CamelHealthCheckAutoConfiguration.class, MyCamelRoute.class})
 public class CamelHealthTest extends Assert {
 
     @Autowired
-    CamelHealthIndicator indicator;
+    CamelHealthCheckIndicator indicator;
 
     @Autowired
     CamelContext camelContext;
@@ -50,12 +48,6 @@ public class CamelHealthTest extends Assert {
 
         String code = health.getStatus().getCode();
         assertEquals("UP", code);
-        
-        String version = (String) health.getDetails().get("version");
-        assertEquals(camelContext.getVersion(), version);
-        
-        String name = (String) health.getDetails().get("name");
-        assertEquals(camelContext.getName(), name);
     }
 
 }

Reply via email to