spring-boot-starter-parent 2.0.1 出现启动引用循环依赖错误

如果你在使用spring-boot-starter-parent 2.0.1版本时出现下面错误

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

   servletEndpointRegistrar defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration.class]
      ↓
   healthEndpoint defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]
      ↓
   org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration
┌─────┐
|  dataSource
↑     ↓
|  scopedTarget.dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
↑     ↓
|  org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker
└─────┘

这个是spring-boot-starter-parent 2.0.1存在的依赖问题

 

解决方案

将spring-boot-starter-parent 2.0.1的版本切换为2.0.2


        org.springframework.boot
        spring-boot-starter-parent
        2.0.1.RELEASE

 

你可能感兴趣的:(SpringCloud)