首页 > 解决方案 > 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

笔记 :

会出什么问题?在我看来,spring 根本没有启动客户端。

标签: javaspringspring-bootspring-boot-admin

解决方案


对于您的 Boot 1.5.x 应用程序,您需要设置spring.boot.admin.api-path=instances. 见http://codecentric.github.io/spring-boot-admin/current/#monitoring-spring-boot-1.5.x


推荐阅读