用了spring-boot-starter-actuator,在监控页面对应服务中显示空值,下面是正常状况下有的值spring
pom配置了maven
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <finalName>${project.name}</finalName> </configuration> </plugin> </plugins> </build>
health配置,防止actuator提供默认端点无返回数据或显示错误页面:ide
#监控短点配置
management:
security:
enabled: false
endpoints:
actuator:
enabled: true
shutdown:
enabled: false
网上关于此问题的不多,所以找了国内外的一些文章,最终有一篇文章中指出了spring-boot-starter-actuator的源码解释:spring-boot
参考源:https://blog.csdn.net/qq_26000415/article/details/79234812ui
到生成的target中发现真的没有这个文件,所以下步就是怎么生成这个build-info,打开idea的以下图位置,运行:idea
spring-boot:build-info,生成Actuator使用的构建信息文件build-info.propertiesspa
而后再看就有此文件了,接下来就是再次正常打包就好了。.net