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

lburgazzoli pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.20.x by this push:
     new 299e24c  CAMEL-12087: camel-core: WARN No CamelContext defined yet so 
cannot inject into bean
299e24c is described below

commit 299e24c54232c5b8b3cc1c4c31b70719c28ba0ef
Author: lburgazzoli <[email protected]>
AuthorDate: Sat Dec 16 15:58:36 2017 +0100

    CAMEL-12087: camel-core: WARN No CamelContext defined yet so cannot inject 
into bean
---
 .../spring/boot/health/HealthCheckRoutesAutoConfiguration.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
index 2d287cd..8b83fc5 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/health/HealthCheckRoutesAutoConfiguration.java
@@ -24,8 +24,9 @@ import 
org.apache.camel.impl.health.RoutesHealthCheckRepository;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.spring.boot.util.GroupCondition;
 import org.apache.camel.util.ObjectHelper;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+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;
@@ -34,15 +35,17 @@ import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Scope;
 
 @Configuration
-@AutoConfigureAfter(CamelAutoConfiguration.class)
+@AutoConfigureBefore(CamelAutoConfiguration.class)
 @Conditional(HealthCheckRoutesAutoConfiguration.Condition.class)
 @EnableConfigurationProperties(HealthCheckRoutesConfiguration.class)
 public class HealthCheckRoutesAutoConfiguration {
+    @Autowired
+    private HealthCheckRoutesConfiguration configuration;
 
     @Bean
     @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
     @ConditionalOnMissingBean(RoutesHealthCheckRepository.class)
-    public HealthCheckRepository 
routesHealthCheckRepository(HealthCheckRoutesConfiguration configuration) {
+    public HealthCheckRepository routesHealthCheckRepository() {
         final RoutesHealthCheckRepository repository = new 
RoutesHealthCheckRepository();
         final HealthCheckRoutesConfiguration.ThresholdsConfiguration 
thresholds = configuration.getThresholds();
 

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to