diff --git a/README.md b/README.md index 5452017..d9093fe 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ mvn spring-boot:start mvn spring-boot:stop ``` -Observability root path: http://localhost:8080/actuator. +# Docker dependency services Clean local Docker environments: @@ -31,13 +31,18 @@ docker compose up docker compose up --force-recreate --renew-anon-volumes ``` +See [docker-compose.yml](./docker-compose.yml) for all services. + +# Observability + +We use Spring Boot actuator to gather several metrics. It is exposed here: http://localhost:8080/actuator. + Now on your machine different services are available: +- Swagger UI: http://localhost:3001 - Grafana: http://localhost:3000 - Prometheus: http://localhost:9090 -See [docker-compose.yml](./docker-compose.yml) for all services. - Grafana dashboards: - https://grafana.com/grafana/dashboards/6756-spring-boot-statistics/ - Ideally there would be a standard dashboard for endpoints and another for database connections. diff --git a/docker-compose.yml b/docker-compose.yml index f028f9c..4438470 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,3 +23,10 @@ services: - ./src/main/resources/static/monitoring/dashboard.json:/etc/dashboards/spring-boot-grafana-dashboard.json:rw ports: - 3000:3000 + + swagger-ui: + image: swaggerapi/swagger-ui:latest + ports: + - "3001:8080" + environment: + URL: http://localhost:8080/api-docs diff --git a/pom.xml b/pom.xml index 8b6a799..e684ec9 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,11 @@ spring-boot-devtools true + + org.springdoc + springdoc-openapi-starter-webmvc-api + 2.2.0 + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 705d36c..a0436bd 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +1,2 @@ -management.endpoints.web.exposure.include=* \ No newline at end of file +management.endpoints.web.exposure.include=* +springdoc.api-docs.path=/api-docs