#!/usr/bin/env bash # What Actuator exposes when you add the starter and configure nothing. set -uo pipefail cd "$(dirname "$0")/.." OUT=docs/output/01-default-exposure.txt { echo "### Spring Boot Actuator, starter added, ZERO management.* configuration" echo echo "\$ curl -s -u ops:ops-password http://localhost:8080/actuator" curl -s -u ops:ops-password http://localhost:8080/actuator | python3 -m json.tool echo echo "\$ curl -s -o /dev/null -w '%{http_code}' -u ops:ops-password http://localhost:8080/actuator/env" curl -s -o /dev/null -w '%{http_code}\n' -u ops:ops-password http://localhost:8080/actuator/env echo " 404 = discovered but NOT exposed over HTTP. Exposure and existence are different things." echo echo "\$ curl -s -u ops:ops-password http://localhost:8080/actuator/health" curl -s -u ops:ops-password http://localhost:8080/actuator/health | python3 -m json.tool echo echo " Only 'health' is web-exposed by default. show-details defaults to 'never', so even an" echo " authenticated caller sees a bare status until you say otherwise." } > "$OUT" 2>&1 echo "wrote $OUT"