我想公开应用程序中的所有终结点。我包含了执行器工作所必需的这些依赖项:
<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。
发布于 2021-06-25 13:26:06
不要引用*
请改用:
management.endpoints.web.exposure.include=*
https://stackoverflow.com/questions/68131730
复制相似问题