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

标签 java spring spring-boot spring-boot-admin

我正在将一个应用程序从 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/

相关文章:

java - 如何在使用 gson 创建的 Json 中添加自定义对象

java - 解决损坏的符号链接(symbolic link)而不检查是否存在

java - 如何根据 http 状态代码路由从 http 出站网关发出的错误消息?

java - 用于 Spring Boot 获取请求的 mongo uri

java - 如何修复 "No ModelAndView found"失败的测试?

java - 在 Spring 中,如何让@PropertyResource 优先于任何其他 application.properties?

java - HttpServletRequest 到 MultipartHttpServletRequest : ClassCastException in Junit

java - 是否可以在少于 O(n log n) 的时间内比较两个二叉树?

java - 参数值 [1] 与预期类型不匹配 [java.lang.Integer (n/a)]

spring - 如何在Spring Boot中使用MultipartConfigElement一次上传多个文件?