Skip to content

Upgrade to Spring Boot 4 and Spring Cloud 2025.1#618

Merged
denniseffing merged 1 commit intocodecentric:mainfrom
bmatthews68:spring-boot-4-upgrade
Feb 6, 2026
Merged

Upgrade to Spring Boot 4 and Spring Cloud 2025.1#618
denniseffing merged 1 commit intocodecentric:mainfrom
bmatthews68:spring-boot-4-upgrade

Conversation

@bmatthews68
Copy link
Contributor

@bmatthews68 bmatthews68 commented Dec 1, 2025

What: Upgraded to Spring Boot 4 and Spring Cloud 2025.1

Why: Upgrading to Spring Boot 4 and Spring Cloud 2025.1 cannot be achieved by merely bumping the version numbers in pom.xml. (Fixes #612)

How: I started by using OpenRewrite's recipe to migrate to Spring Boot 4. Then I added missing dependencies where necessary and updated property names.

Checklist:

  • Documentation added
    N/A
  • Changelog updated
  • Tests added
  • de.codecentric.spring.boot.chaos.monkey.endpoints.dto.validation.AssaultPropertiesUpdateTest
  • de.codecentric.spring.boot.chaos.monkey.endpoints.dto.validation.WatcherPropertiesUpdateTest
  • Ready to be merged
    Yes. However, I have chosen not to update the version number as I don't know if the owners would like to use 3.3.x or 4.0.x.

@bmatthews68 bmatthews68 marked this pull request as draft December 1, 2025 23:40
@bmatthews68 bmatthews68 marked this pull request as ready for review December 2, 2025 00:12
@marcingrzejszczak
Copy link

marcingrzejszczak commented Dec 2, 2025

Awesome work! I need the upgrade for my workshops :D

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.11%. Comparing base (5433f0c) to head (4e3154f).
⚠️ Report is 123 commits behind head on main.

Files with missing lines Patch % Lines
.../monkey/endpoints/dto/AssaultPropertiesUpdate.java 0.00% 1 Missing ⚠️
.../monkey/endpoints/dto/WatcherPropertiesUpdate.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #618      +/-   ##
============================================
- Coverage     82.31%   82.11%   -0.21%     
- Complexity      388      389       +1     
============================================
  Files            84       86       +2     
  Lines           950      928      -22     
  Branches         68       61       -7     
============================================
- Hits            782      762      -20     
- Misses          142      143       +1     
+ Partials         26       23       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@denniseffing
Copy link
Member

Hi @bmatthews68 and thank you for your contribution!
I don't want to promise anything but we'll work on this soon, hopefully getting this done this month. Sorry for the delay.

@marcingrzejszczak
Copy link

@denniseffing If I can help somehow please tell me!

@jahutton
Copy link

Any chance this can be released? Spring Boot 4.0 has been out for a while.

@marcingrzejszczak
Copy link

marcingrzejszczak commented Jan 28, 2026

@bmatthews68 I couldn't build your branch - I asked Claude for help and managed to build a 4.0.0-M1 PR here of the project that (most likely) works against Spring Boot 4.

@bmatthews68
Copy link
Contributor Author

@bmatthews68 I couldn't build your branch - I asked Claude for help and managed to build a 4.0.0-M1 PR here of the project that (most likely) works against Spring Boot 4.

Hi @marcingrzejszczak, I forgot to make sure to run demo application tests until I noticed the workflow build had failed. I had already added the missing dependencies. I've avoided changing the version number. I think it should be 4.0.0. But I'm not sure what the maintainers would like to do.

@denniseffing denniseffing self-requested a review January 30, 2026 13:54
@WtfJoke WtfJoke requested a review from Copilot January 30, 2026 15:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project to Spring Boot 4.0.2 and Spring Cloud 2025.1.0, along with necessary dependency and configuration updates to support the migration. The upgrade includes updating actuator endpoint configurations, migrating to new package locations for several Spring Boot components, and adjusting Jackson library references.

Changes:

  • Updated version numbers for Spring Boot (3.5.10 → 4.0.2), Spring Cloud (2024.0.3 → 2025.1.0), spring-doc (1.8.0 → 3.0.0), and jacoco (0.8.13 → 0.8.14)
  • Migrated actuator endpoint properties from enabled to access pattern and updated package imports for Spring Boot 4 compatibility
  • Added new test cases for WatcherPropertiesUpdate and AssaultPropertiesUpdate to handle DatabindException

Reviewed changes

Copilot reviewed 58 out of 58 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Updated Spring Boot, Spring Cloud, spring-doc, and jacoco version numbers
Multiple application.properties files Changed management endpoint configuration from enabled to access pattern
Multiple test files Updated imports for TestRestTemplate, WebMvcTest, and added @AutoConfigureTestRestTemplate annotations
Multiple pom.xml files Added spring-boot-starter-restclient and spring-boot-starter-webmvc-test dependencies, changed spring-boot-starter-web to spring-boot-starter-webmvc
Watcher and endpoint source files Updated package imports for Jackson, RestTemplateBuilder, WebClientCustomizer, and Health classes
Documentation files Updated endpoint configuration examples and PropertiesLauncher path
Test files Added new test files for WatcherPropertiesUpdate and AssaultPropertiesUpdate

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@denniseffing
Copy link
Member

denniseffing commented Jan 30, 2026

Hi, we finally started the review today. We are half-way through, you can probably expect a new release at the end of next week. Again, sorry for the delay.

Thank you a lot for providing & continuously updating the PR, we really appreciate it!

@susenthi
Copy link

susenthi commented Feb 5, 2026

Any update on this release please. Thank you

@marcingrzejszczak
Copy link

@denniseffing denniseffing force-pushed the spring-boot-4-upgrade branch from 42cd2b1 to ab25c4c Compare February 6, 2026 14:30
@denniseffing denniseffing force-pushed the spring-boot-4-upgrade branch from ab25c4c to 4e3154f Compare February 6, 2026 14:46
Copy link
Contributor

@WtfJoke WtfJoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We (@denniseffing and me) have gone over all your changes, looked good :) We made a few changes and squashed the commits.

Thank you for your work @bmatthews68 :)


private String togglePrefix = "chaos.monkey";

@Nullable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

public Object postProcessBeforeInitialization(final Object bean, final String beanName) throws BeansException {
if (bean instanceof RestTemplate) {
this.restTemplateCustomizer.customize((RestTemplate) bean);
if (bean instanceof RestTemplate template) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@denniseffing denniseffing merged commit 430d8aa into codecentric:main Feb 6, 2026
6 checks passed
@denniseffing
Copy link
Member

@bmatthews68 @marcingrzejszczak @jahutton @susenthi We just released v4.0.0 with support for Spring Boot v4.

It usually takes some time before it is available on Maven Central.

Thank you all for your contributions & your interest!

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.

Support for Spring Boot 4.0

6 participants