简体   繁体   English

无法将Spring Boot Admin Server 2和Spring Boot Admin Client 2与Spring Boot 2集成在单个应用程序中

[英]Can't integrate Spring Boot Admin Server 2 and Spring Boot Admin Client 2 with Spring Boot 2 in a single application

I'm migrating an application from Spring Boot to Spring Boot 2. Previously we had to use Spring Boot Admin Server and Client in a single application (ie the application was both a server and a client at the same). 我正在将一个应用程序从Spring Boot迁移到Spring Boot2。以前,我们不得不在单个应用程序中使用Spring Boot Admin Server和Client(即,该应用程序既是服务器又是客户端)。 That is weird but we have to continue use it the same way at least for now. 这很奇怪,但是至少现在我们必须继续以相同的方式使用它。

At first I decided to make it work using a demo project: https://github.com/dmitrysenkovich/spring_boot_admin_2_not_working 最初,我决定使用一个演示项目使其工作: https : //github.com/dmitrysenkovich/spring_boot_admin_2_not_working

However, I'm getting an error: 但是,出现错误:

ApplicationRegistrator: Failed to register application as Application(name=spring-boot-admin-sample-servlet, managementUrl=http://localhost:8080/actuator, healthUrl=http://localhost:8080/actuator/health, serviceUrl=http://localhost:8080/actuator/admin) at spring-boot-admin ([http://localhost:8080/instances]): 404 null. Further attempts are logged on DEBUG level

Spring Boot version is 2.0.4.RELEASE and Spring Boot Admin Client/Server is 2.0.2. Spring Boot版本是2.0.4.RELEASE,Spring Boot Admin客户端/服务器是2.0.2。

Hope one can make it work. 希望能使它工作。 Thank you in advance! 先感谢您!

Johannes Edmeier (the creator of Spring Boot Admin) answered me on GitHub here: https://github.com/codecentric/spring-boot-admin/issues/889 . Johannes Edmeier(Spring Boot Admin的创建者)在GitHub上对我的回答是: https : //github.com/codecentric/spring-boot-admin/issues/889

If you set the spring.boot.admin.context-path, you also have to include this suffix in the spring.boot.admin.client.url 如果设置了spring.boot.admin.context-path,则还必须在spring.boot.admin.client.url中包含此后缀

It works! 有用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM