Add actuator and micrometer

pull/95/head
Menci 2024-12-07 02:32:48 +08:00
parent 8434842c65
commit db5343fba3
2 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,10 @@ dependencies {
testImplementation("org.springframework.security:spring-security-test")
implementation("net.logstash.logback:logstash-logback-encoder:7.4")
// Metrics
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-registry-prometheus")
// Database
runtimeOnly("org.mariadb.jdbc:mariadb-java-client:3.3.3")
runtimeOnly("org.xerial:sqlite-jdbc:3.45.2.0")

View File

@ -33,3 +33,8 @@ spring.jpa.hibernate.ddl-auto=none
# https://github.com/termstandard/colors#truecolor-support-in-output-devices
# If you want to read the logs using a script, read the json logs in `logs` folder instead.
spring.output.ansi.enabled=always
# Metrics
management.server.port=8081
management.endpoint.prometheus.enabled=true
management.endpoints.web.exposure.include=prometheus