Skip to content

can't initialize database schema when Spring Cloud Config is in the classpath. #983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
runabol opened this issue Apr 19, 2018 · 1 comment

Comments

@runabol
Copy link

runabol commented Apr 19, 2018

Spring Cloud Version: Finchley.M9
Java Version: 8

Dependency:

   <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-config</artifactId>
     <version>2.0.0.M9</version>
  </dependency>

Startup config:

-Dspring.datasource.initialization-mode=always

Console:

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]
      ↓
   dbHealthIndicator defined in class path resource [org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthIndicatorAutoConfiguration.class]
┌─────┐
|  scopedTarget.dataSource defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]
↑     ↓
|  org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker
└─────┘

When I remove the Spring Cloud Config dependency everything works just fine.

@ryanjbaxter
Copy link
Contributor

Seems like this might be a duplicate of spring-cloud/spring-cloud-commons#355. Could perhaps supply a sample in that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants