Springboot upgrade 1.5.8 to 2.0 release getting ex

2019-07-22 12:39发布

Gradle dependency related to kubernetes:

  "io.fabric8:spring-cloud-kubernetes-core:0.1.6",
  "io.fabric8:spring-cloud-starter-kubernetes:0.1.6",
  "org.springframework.cloud:spring-cloud-starter-sleuth:1.2.4.RELEASE",

Getting the below exception while upgrading springboot 1.5.6 to 2.0.0.Release

Parameter 2 of method configurationUpdateStrategy in io.fabric8.spring.cloud.kubernetes.reload.ConfigReloadAutoConfiguration$ConfigReloadAutoConfigurationBeans required a bean of type 'org.springframework.cloud.context.restart.RestartEndpoint' that could not be found.

  • Bean method 'restartEndpoint' not loaded because @ConditionalOnClass did not find required class 'org.springframework.integration.monitor.IntegrationMBeanExporter'

  • Bean method 'restartEndpointWithoutIntegration' in 'RestartEndpointWithoutIntegrationConfiguration' not loaded because @ConditionalOnEnabledEndpoint found property management.endpoint.restart.enabled with value false

1条回答
祖国的老花朵
2楼-- · 2019-07-22 13:02

You can do either of following, depending on your requirements:

  1. Disable ConfigReloadAutoConfiguration if you don't need it:

    @SpringBootApplication(exclude = ConfigReloadAutoConfiguration.class)
    public class SomeApplication {
        ...
    }
    
  2. Add the following into your application.properties, just as the error message says:

    management.endpoint.restart.enabled = true
    
查看更多
登录 后发表回答