English, Marathi and Hindi bundles behind one small web app, with tests that run it on a real port and write the transcripts (01-11) quoted in the article, plus a jar-metadata capture (12). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Uu7q8vPeREyT4218EJPzz1
25 lines
1.1 KiB
Bash
Executable File
25 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Facts that a test cannot observe, read straight out of the jars on the classpath.
|
|
# 12-configuration-metadata.txt every spring.messages.* and spring.web.locale* property, with type and default
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
mkdir -p output target
|
|
mvn -B -q dependency:build-classpath -Dmdep.outputFile=target/classpath.txt >/dev/null
|
|
|
|
{
|
|
echo "# spring.messages.* and spring.web.locale* in the configuration metadata shipped with Spring Boot 4.1.1"
|
|
echo
|
|
for jar in $(tr ':' '\n' < target/classpath.txt | grep -E 'spring-boot-autoconfigure-'); do
|
|
echo "jar: $(basename "$jar")"
|
|
echo
|
|
unzip -p "$jar" META-INF/spring-configuration-metadata.json | python3 -c '
|
|
import json, sys
|
|
for p in sorted(json.load(sys.stdin)["properties"], key=lambda p: p["name"]):
|
|
if p["name"].startswith(("spring.messages.", "spring.web.locale")):
|
|
print("%s\n type: %s\n default: %s" % (p["name"], p.get("type"), json.dumps(p["defaultValue"]) if "defaultValue" in p else "(none)"))
|
|
'
|
|
done
|
|
} > output/12-configuration-metadata.txt
|
|
|
|
cat output/12-configuration-metadata.txt
|