Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 普罗米修斯终点未暴露_Spring Boot_Prometheus_Spring Boot Actuator - Fatal编程技术网

Spring boot 普罗米修斯终点未暴露

Spring boot 普罗米修斯终点未暴露,spring-boot,prometheus,spring-boot-actuator,Spring Boot,Prometheus,Spring Boot Actuator,我在SpringBoot应用程序中以以下方式添加了prometheus依赖项 我在gradle中添加了以下依赖项 runtimeOnly ('io.micrometer:micrometer-registry-prometheus') runtimeOnly ('io.micrometer:micrometer-core') application.yml management: endpoints.web.exposure.include: '*' endpoint.metrics.

我在SpringBoot应用程序中以以下方式添加了prometheus依赖项

我在gradle中添加了以下依赖项

runtimeOnly ('io.micrometer:micrometer-registry-prometheus')
runtimeOnly ('io.micrometer:micrometer-core')
application.yml

management:
  endpoints.web.exposure.include: '*'
  endpoint.metrics.enabled: true
  endpoint.prometheus.enabled: true
  metrics.export.prometheus.enabled: true
server.servlet.context-path: /route
部署文件中的注释 部署.yml

 annotations:
    prometheus.io/scrape: "true"
    prometheus.io/probe: "true"
    prometheus.io/port: "8010"
    prometheus.io/path: "/actuator/prometheus"
部署后,未暴露/执行器/prometheus端点,但在localhost中暴露了该端点 我应该做什么改变才能让它工作