Upgrade to Spring Boot 4 and Spring Cloud 2025.1#618
Upgrade to Spring Boot 4 and Spring Cloud 2025.1#618denniseffing merged 1 commit intocodecentric:mainfrom
Conversation
|
Awesome work! I need the upgrade for my workshops :D |
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
|
Hi @bmatthews68 and thank you for your contribution! |
|
@denniseffing If I can help somehow please tell me! |
|
Any chance this can be released? Spring Boot 4.0 has been out for a while. |
|
@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. |
There was a problem hiding this comment.
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
enabledtoaccesspattern 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.
|
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! |
|
Any update on this release please. Thank you |
|
If you're impatient you can use my fork and jitpack.io https://github.com/marcingrzejszczak/java_microservices/blob/main/3x4h/day3/part3/fraud-detection/pom.xml#L56-L66 and https://github.com/marcingrzejszczak/java_microservices/blob/main/3x4h/day3/part3/fraud-detection/pom.xml#L114-L120 |
42cd2b1 to
ab25c4c
Compare
ab25c4c to
4e3154f
Compare
WtfJoke
left a comment
There was a problem hiding this comment.
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 |
| 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) { |
|
@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! |
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:
N/A
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.