【发布时间】:2021-06-25 13:24:14
【问题描述】:
我想公开我的应用程序中的所有端点。我包括了执行器工作所必需的这些依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
还有我的 application.properties 文件:
management.endpoints.web.exposure.include= '*'
启动应用程序后(通过 Intellij 或命令 mvn spring-boot: run),日志包含以下行:
2021-06-25 15:07:39.253 INFO 21068 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
这些端点是信息和健康。当我发送这个 URL 时:http://localhost:8080/actuator/metrics 然后我得到 404。
【问题讨论】:
标签: spring-boot endpoint spring-boot-actuator