Skip to content

feat(core): add Spring 5 / Spring Boot 2.x compatibility#40

Merged
rieckpil merged 3 commits intomainfrom
spring5-compat
Mar 26, 2026
Merged

feat(core): add Spring 5 / Spring Boot 2.x compatibility#40
rieckpil merged 3 commits intomainfrom
spring5-compat

Conversation

@rieckpil
Copy link
Copy Markdown
Contributor

Replace direct call to BootstrapUtils.resolveTestContextBootstrapper() with reflection-based access. BootstrapUtils is package-private in Spring 5.x (made public in Spring 6), and the convenience overload accepting Class<?> was only added in Spring 6.

The reflection helper tries the Spring 6+ public method first, then falls back to the Spring 5 two-step path (createBootstrapContext + resolveTestContextBootstrapper with BootstrapContext).

Adds a Spring Boot 2.7 demo project to verify compatibility.

rieckpil and others added 3 commits March 25, 2026 19:59
Replace direct call to BootstrapUtils.resolveTestContextBootstrapper()
with reflection-based access. BootstrapUtils is package-private in
Spring 5.x (made public in Spring 6), and the convenience overload
accepting Class<?> was only added in Spring 6.

The reflection helper tries the Spring 6+ public method first, then
falls back to the Spring 5 two-step path (createBootstrapContext +
resolveTestContextBootstrapper with BootstrapContext).

Adds a Spring Boot 2.7 demo project to verify compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Replace #temporals.format() with pre-formatted string variable in
  summary.html (Thymeleaf 3.0.x lacks built-in #temporals support)
- Add --add-opens java.base/java.util=ALL-UNNAMED to Failsafe argLine
  for the 2.7 demo (Thymeleaf 3.0.x OGNL needs reflective access on
  Java 17+)
- Catch Exception (not just IOException) in report generation to prevent
  silent failures
- Add stderr output in shutdown hook for better error visibility
- Add mvnw wrapper to Spring Boot 2.7 demo
- Add spring-boot-2.7-maven to CI matrix

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add @WebMvcTest, @DirtiesContext, and RANDOM_PORT integration tests to
exercise more distinct context configurations and improve profiler
coverage on Spring 5.

Update README to clarify Spring 5/6/7 compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@rieckpil rieckpil merged commit d9f4627 into main Mar 26, 2026
8 checks passed
@rieckpil rieckpil deleted the spring5-compat branch March 26, 2026 06:15
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.

1 participant