gateway-mvc: add transcript for the wrong Spring Retry import
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b3W3uHbHAmM3orhn7b
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
32086c1f5b
commit
3c17b13c3f
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Shows what happens if RoutesConfig imports GatewayRetryFilterFunctions.retry (the Spring Retry flavour)
|
||||
# instead of RetryFilterFunctions.retry (the one that picks an implementation). Works on a temporary copy.
|
||||
set -u
|
||||
. "$(dirname "$0")/lib.sh"
|
||||
TMP="$(mktemp -d)"; cp -r "$HERE/pom.xml" "$HERE/src" "$TMP/"
|
||||
sed -i 's/filter\.RetryFilterFunctions\.retry/filter.GatewayRetryFilterFunctions.retry/' "$TMP/src/main/java/com/ankurm/gwmvc/RoutesConfig.java"
|
||||
echo "\$ diff: the one-line change"
|
||||
grep -n 'RetryFilterFunctions.retry' "$TMP/src/main/java/com/ankurm/gwmvc/RoutesConfig.java"
|
||||
(cd "$TMP" && mvn -B -q -DskipTests package 2>&1 | grep -E 'ERROR|BUILD' | head -3)
|
||||
stop_all
|
||||
java -jar "$TMP/target/gateway-mvc-1.0.0.jar" --server.port=8099 > "$LOGDIR/wrong-import.log" 2>&1
|
||||
echo "# startup log:"
|
||||
grep -m1 -oE 'Factory method .retryRoute. threw exception with message: [^ ]+' "$LOGDIR/wrong-import.log"
|
||||
grep -m1 'Caused by: java.lang.NoClassDefFoundError' "$LOGDIR/wrong-import.log"
|
||||
rm -rf "$TMP"
|
||||
Reference in New Issue
Block a user