4finance / micro-infra-spring

Repository containing default microservice infrastructure set up using Spring configuration
Apache License 2.0
203 stars 49 forks source link

micro-infra-spring-config should not have spring-boot-starter-actuator dependency #411

Open szpak opened 9 years ago

szpak commented 9 years ago

spring-boot-starter-actuator dependency comes from org.springframework.cloud:spring-cloud-config-server. Unfortunately a quick try to exclude it fails tests with:

java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.autoconfigure.RefreshAutoConfiguration$RefreshEndpointsConfiguration$RefreshEndpointConfiguration.refreshEndpoint
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:58)
    at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)
    at com.ofg.infrastructure.property.AbstractIntegrationSpec.contextWithSources(AbstractIntegrationSpec.groovy:37)
    at com.ofg.infrastructure.property.LoadingFromFileSystemSpec.setupSpec(LoadingFromFileSystemSpec.groovy:22)
Caused by: java.lang.IllegalArgumentException: @ConditionalOnMissingBean annotations must specify at least one bean (type, name or annotation)
    at org.springframework.util.Assert.isTrue(Assert.java:65)
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.<init>(OnBeanCondition.java:223)
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:92)
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
    ... 15 more

Maybe on upgrade to spring-cloud-config 1.0.1 (#386) would fix it.

marcingrzejszczak commented 9 years ago

@szpak is the issue still there?