我有一个 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 根本没有启动客户端。