#!/usr/bin/env bash # Which @ControllerAdvice beans exist, in consultation order. -> docs/output/advice-order.txt set -uo pipefail source "$(dirname "$0")/env.sh" { for profile in "" boot-flag advice "boot-flag,advice" catchall-first; do "$MODULE_DIR/scripts/run.sh" "$profile" || exit 1 echo "## profiles: ${profile:-}" curl -s "$BASE/diag/advice" | python3 -c 'import json,sys for r in json.load(sys.stdin): print(" order %-12s %s" % (r["order"], r["bean"])) ' ; echo done } > "$OUT/advice-order.txt" "$MODULE_DIR/scripts/stop.sh" cat "$OUT/advice-order.txt"