java - Spring Boot Admin 客户端未注册
问题描述
我有一个 spring boot 1.5.1 服务和一个 spring boot admin 2.0.1。
鉴于本文档( http://codecentric.github.io/spring-boot-admin/2.0.0/#monitoring-spring-boot-1.5.x),这些是兼容的。
这是我的客户端设置
我的入口点
@SpringBootApplication
public class Run {
/**
* Starts the application.
* @param args the arguments to start the application.
* @throws Exception if an error occurs.
*/
public static void main(String[] args)
throws Exception {
SpringApplication.run(Run.class, args);
}
}
构建.gradle
dependencies {
//other internal dependencies
compile 'org.modelmapper:modelmapper:0.7.7'
compile 'org.springframework.boot:spring-boot-starter-security:1.5.1.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-web:1.5.1.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-jdbc:1.5.1.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-data-redis:1.5.1.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-amqp:1.5.1.RELEASE'
compile 'org.springframework.boot:spring-boot-actuator:1.5.1.RELEASE'
compile('de.codecentric:spring-boot-admin-starter-client:1.5.7')
compile 'org.postgresql:postgresql:9.4-1206-jdbc42'
provided 'javax.servlet:javax.servlet-api:3.1.0'
provided 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.1'
}
应用程序.yml
management:
security:
enabled: false
spring:
boot:
admin:
url: http://localhost:8080
对于服务器设置,我遵循这里的入门http://codecentric.github.io/spring-boot-admin/2.0.0/#_what_is_spring_boot_admin。
笔记 :
- 我认为服务器设置没问题,因为我可以将服务器注册到自己
- 当我启动客户端时,没有任何关于 SBA 客户端的内容,即使我将“logging.level.de.codecentric.boot.admin:DEBUG”添加到我的 application.yml
- 客户端没有在服务器的日志上注册失败
- 我尝试使用随机字符串更改服务器 url 以查看是否会出现错误,但它没有告诉任何有关该问题的信息
- 客户端上有一个 configure(httpSecurity) 覆盖
会出什么问题?在我看来,spring 根本没有启动客户端。
解决方案
对于您的 Boot 1.5.x 应用程序,您需要设置spring.boot.admin.api-path=instances
. 见http://codecentric.github.io/spring-boot-admin/current/#monitoring-spring-boot-1.5.x
推荐阅读
- reactjs - 自定义钩子中 useEffect 的生命周期是什么?
- vba - 查询结果某列不为空时提示msgbox
- c# - 防止在 Windows 窗体中使用鼠标滚轮滚动
- python - 如何在k-means中记录每次迭代的质心?
- chef-infra - Chef::Exceptions::InvalidRemoteFileURI - nil 不是 remote_file 的有效 `source` 参数。`source` 必须是绝对 URI 或 URI 数组
- svg - 如何为 Imagemagick 启用 SVG 支持
- javascript - Bootstrap 下拉菜单在 Angular 8 项目中不起作用
- node.js - 需要两次搜索的数据库设计
- linq - LINQ:向上遍历层次结构以检索父层次结构
- windows - 启动时的 Websocket 连接 ssl 问题(Windows)