我有自定义启动器应用程序(库),它具有执行器和普罗米修斯依赖项
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.5.2</version>
</dependency>
在 application.properties
management.endpoints.web.exposure.include=health, info, metrics, prometheus
我在我的其他应用程序中使用这个启动器,我还想从启动器传递端点的这个展示。Actuator 和 Prometheus 依赖项在应用程序中有效,但在 starter 中不显示选定的端点。Ofc 我也可以management.endpoints.web.exposure.include=health, info, metrics, prometheus
在我的应用程序中添加行,但是对于使用此启动器的多个应用程序,我想一劳永逸地传递它,并仅在需要时在启动器中更改端点。
你知道如何在我的应用程序中公开那些在启动器中设置的端点吗?
Spring Boot v2.3.2 / Maven 3.6.3