我想在 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