springboot+prometheus+grafana 程序使用实例

1、新建SpringBoot项目

2、引入pom依赖

<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.6.2</version>
</dependency>

3、更改application.properties

server.port=8088
spring.application.name=spg
management.endpoints.web.exposure.include=*
上一篇:mysql 中 王数据表中插入中文字段报错:mysql> insert into a values(202,"王一"); ERROR 1366 (HY000): Incorr


下一篇:云原生监控系统Prometheus——Sprint Boot可视化监控