0

我们有一个使用自定义上下文路径的服务。为了在 Eureka Server 上正确注册我们的服务,我们设置了以下内容:

eureka.instance.statusPageUrl=http://xxx/custom/info
eureka.instance.healthCheckUrl=http://xxx/custom/health
eureka.instance.homePageUrl=http://xxx/custom/

这运行良好,我们的应用程序已注册。但是,虽然我们已经设置了info.version信息,但它并没有显示在Spring Boot Admin主页上。对于我们没有自定义上下文路径的应用程序,它正在工作:

在此处输入图像描述

知道最终丢失了哪些属性吗?

4

1 回答 1

1

您需要将以下内容添加到您的 pom.xml 中:

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>build-info</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

文档链接

于 2018-03-12T13:07:15.663 回答