Dependencies cycle between actuator and spring-data-jpa
chinfeng opened this issue · 11 comments
It just appear when i use spring-boot-starter-actuator and spring-boot-starter-data-jpa together.
***************************
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
└─────┘
@chinfeng I'm not seeing the same error when I add actuator to our JPA sample. Can you please share a zip file or github repo with a project that shows the problem?
I think this is a duplicate of #13042. It’s triggered by Spring Cloud where a workaround has also now been implemented.
Thanks @wilkinsona . The problem gone when I remove @EnableDiscoveryClient from application class.
hi ,I met the same problem.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
If I modify the spring boot version 2.0.1
to 2.0.2
, it will be gone.
I'm able to work around this issue by specifying management.server.port different than the server.port
mark。i fixed my project with this way
That's rt @wenfei3 , post update to 2.0.2.RELEASE version of spring boot parent , it works fine .
hi ,I met the same problem.
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.1.RELEASE</version> </parent>
If I modify the spring boot version
2.0.1
to2.0.2
, it will be gone.
This one worked :)
That's rt @wenfei3 , post update to 2.0.2.RELEASE version of spring boot parent , it works fine .
This is a good suggestion. Thank you.
hi ,I met the same problem.
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.1.RELEASE</version> </parent>
If I modify the spring boot version
2.0.1
to2.0.2
, it will be gone.
I have changed the Spring boot version to 2.0.2, but this situation still occurs. I don't know what the situation is.
@LeeYiua This issue was originally tracking a problem that was then fixed in Spring Cloud. I suspect that those whose problem was solved by upgrading to Spring Boot 2.0.2 from 2.0.1 had a different problem as no change was made in Spring Boot as a result of this issue. Also, please not that Spring Boot 2.0.x is no longer supported. I would recommend upgrading to Spring Boot 2.3.x.