- 后端:引入下 Metrics 相关的包

This commit is contained in:
YunaiV
2019-05-20 16:12:57 +08:00
parent 733433e722
commit f29d427fb1
14 changed files with 109 additions and 22 deletions

View File

@@ -62,6 +62,18 @@
<artifactId>swagger-bootstrap-ui</artifactId>
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<!-- 测试相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -18,3 +18,11 @@ server:
swagger:
enable: false
management:
endpoints:
web:
exposure:
include: health,info,env,metrics,prometheus
metrics:
enabled: true