我正在将一个应用程序从 Spring Boot 迁移到 Spring Boot 2。以前,我们必须在单个应用程序中使用 Spring Boot 管理服务器和客户端(即该应用程序同时是服务器和客户端)。这很奇怪,但至少现在我们必须继续以同样的方式使用它。
首先我决定使用演示项目来使其工作: https://github.com/dmitrysenkovich/spring_boot_admin_2_not_working
但是,我收到错误:
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 版本为 2.0.4.RELEASE,Spring Boot 管理客户端/服务器为 2.0.2。
希望有人能成功。预先感谢您!
最佳答案
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
它有效!
关于java - 无法将 Spring Boot Admin Server 2 和 Spring Boot Admin Client 2 与 Spring Boot 2 集成在单个应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51912880/