1

我想在 Spring Boot 管理服务器中注册同一应用程序的两个实例(仅端口不同)。但我在我的 Spring Boot 管理面板中只看到一个实例(MyApp 实例 2)。我的配置有什么问题?

基本信息:

  • Spring Boot 管理客户端 - 2.0.0-SNAPSHOT
  • Spring Boot 管理服务器 - 2.0.0-SNAPSHOT
  • Spring Boot 版本(两者) - 2.0.1.RELEASE

我的 application.yml 文件:

spring:
  boot:
    admin:
      client:
        url: http://example.org:7474/admin/
        instance:
          name: 'MyApp instance 1'
          service-url: http://example.org:7474/MyApp/
          service-base-url: http://example.org:7474/
          metadata:
            user.name: myuser
            user.password: mypassword
        instance:
          name: 'MyApp instance 2'
          service-url: http://example.org:27474/MyApp/
          service-base-url: http://example.org:27474/
          metadata:
            user.name: myuser
            user.password: mypassword
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS
4

1 回答 1

2

目前 Spring Boot Admin Client 能够进行单次注册。

我认为两次注册同一个实例是很不寻常的(正如您的配置尝试做的那样)

如果您在每个实例中包含客户端以进行注册,则它可以工作。

于 2018-04-23T19:49:57.980 回答