Add ai-21-migration module: upgrading Spring AI 2.0.x to 2.1.0, measured. One probe source tree run on 2.0.0, 2.0.2, 2.0.3 and 2.1.0 (Anthropic prompt tokens with caching, auth header, discarded temperature, thinking parts, message mutability, entity() on refusals), three compile breaks, API and configuration diffs from the jars, ChatMemory to session copy, a wrapping ToolCallingManager under tool confirmation, the OpenAI Responses switch, VectorStore.upsert on real pgvector, a grep checklist and an OpenRewrite recipe. Scripted and local fake models; no provider called. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
Claude
2026-12-03 09:46:46 +05:30
parent 8f69e7bf50
commit c8fa0912f7
71 changed files with 1990 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env python3
"""Compare Spring Boot configuration metadata between two directories of jars.
usage: python3 -I scripts/config-diff.py target/jars/2.0.3 target/jars/2.1.0"""
import collections
import glob
import json
import sys
import zipfile
def load(directory):
props = {}
for jar in sorted(glob.glob(directory + "/*.jar")):
with zipfile.ZipFile(jar) as z:
if "META-INF/spring-configuration-metadata.json" in z.namelist():
data = json.loads(z.read("META-INF/spring-configuration-metadata.json"))
for p in data.get("properties", []):
props.setdefault(p["name"], p)
return props
old, new = load(sys.argv[1]), load(sys.argv[2])
removed = sorted(set(old) - set(new))
added = sorted(set(new) - set(old))
deprecated = [n for n in sorted(set(old) & set(new)) if new[n].get("deprecated") and not old[n].get("deprecated")]
print(f"properties: old={len(old)} new={len(new)}")
print(f"\nREMOVED: {len(removed)}")
for n in removed:
print(" " + n)
print(f"\nNEWLY DEPRECATED: {len(deprecated)}")
for n in deprecated:
replacement = new[n].get("deprecation", {}).get("replacement")
print(f" {n}" + (f" -> {replacement}" if replacement else ""))
print(f"\nADDED: {len(added)}, by prefix")
for prefix, count in sorted(collections.Counter(".".join(n.split(".")[:4]) for n in added).items()):
print(f" {prefix} {count}")