Skip to content

Commit 96e095b

Browse files
author
SamuelQuetin
committed
Add Spring Actuator with Prometheus and configure management endpoints
1 parent d58f3fd commit 96e095b

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

pom.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
<properties>
3333
<spring.profiles.active>localhost</spring.profiles.active>
3434
</properties>
35+
<dependencies>
36+
<dependency>
37+
<groupId>com.oracle.database.jdbc</groupId>
38+
<artifactId>ojdbc8</artifactId>
39+
<version>21.3.0.0</version>
40+
</dependency>
41+
</dependencies>
3542
</profile>
3643
<profile>
3744
<id>dev</id>
@@ -124,6 +131,14 @@
124131
</exclusions>
125132
</dependency>
126133

134+
<dependency>
135+
<groupId>org.springframework.boot</groupId>
136+
<artifactId>spring-boot-starter-actuator</artifactId>
137+
</dependency>
138+
<dependency>
139+
<groupId>io.micrometer</groupId>
140+
<artifactId>micrometer-registry-prometheus</artifactId>
141+
</dependency>
127142
<!-- permet de gérer les contraintes d'intégrité de la BDD et les champs not null -->
128143
<dependency>
129144
<groupId>org.springframework.boot</groupId>
@@ -146,11 +161,6 @@
146161
<artifactId>spring-boot-starter-cache</artifactId>
147162
</dependency>
148163
<!--BDD-->
149-
<dependency>
150-
<groupId>com.oracle.database.jdbc</groupId>
151-
<artifactId>ojdbc8</artifactId>
152-
<version>21.3.0.0</version>
153-
</dependency>
154164
<dependency>
155165
<groupId>com.oracle.database.xml</groupId>
156166
<artifactId>xdb</artifactId>

src/main/resources/application.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ logging.config=classpath:log4j2-all.xml
1616
springdoc.packages-to-scan=fr.abes.convergence.controller
1717
springdoc.api-docs.path=/api-docs/
1818
springdoc.swagger-ui.path=/swagger-ui.html
19+
20+
management.server.port=8083
21+
management.endpoints.web.exposure.include=prometheus,health

0 commit comments

Comments
 (0)