Skip to content

Fix BOAT templates for Spring 7 and Jakarta validation compatibility#1232

Closed
jmanzanog wants to merge 5 commits intomainfrom
fix/ssdk21-spring7-generator-compat
Closed

Fix BOAT templates for Spring 7 and Jakarta validation compatibility#1232
jmanzanog wants to merge 5 commits intomainfrom
fix/ssdk21-spring7-generator-compat

Conversation

@jmanzanog
Copy link

@jmanzanog jmanzanog commented Mar 23, 2026

fixes template-level incompatibilities introduced by SSDK 21 (Spring Boot 4 / Spring 7 / Jakarta).
It updates the RestTemplate ApiClient template to use Spring 7-compatible APIs (containsHeader, fromUriString, headerSet) and updates bean-validation templates to generate jakarta.validation.constraints.Email when useJakartaEe=true.

By fixing generation at source, downstream projects no longer need post-generation maven-antrun replacements to compile.

Update BOAT templates so generated resttemplate clients use Spring 7-compatible HttpHeaders/UriComponentsBuilder APIs and emit Jakarta Email annotations when Jakarta EE is enabled. This removes the need for downstream post-generation text replacement workarounds in SSDK 21 projects.

Made-with: Cursor
@jmanzanog jmanzanog changed the title fix: align generated clients with Spring 7 and Jakarta validation Fix BOAT templates for Spring 7 and Jakarta validation compatibility Mar 23, 2026
Add explicit resttemplate generation assertions so ApiClient stays compatible with both Spring 5 and Spring 7 HttpHeaders APIs. Add POM guard tests to keep classpath-isolation fixes in place and prevent ClassRealm regressions in plugin CI.
@jmanzanog jmanzanog marked this pull request as ready for review March 23, 2026 17:12
@sonarqubecloud
Copy link

@jmanzanog jmanzanog closed this Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants