-
Notifications
You must be signed in to change notification settings - Fork 4
Fix Spring Boot 4.0.0 compatibility - add Jackson 2 support module #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7883422
fd893af
396728e
15128cf
0130305
def2178
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * Copyright 2016-2025 Berry Cloud Ltd. All rights reserved. | ||
| */ | ||
|
|
||
| package dev.learning.xapi.client.configuration; | ||
|
|
||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.web.reactive.function.client.WebClient; | ||
|
|
||
| /** | ||
| * Test configuration to provide WebClient.Builder bean for tests. | ||
| * | ||
| * <p>In Spring Boot 4.0, WebClient.Builder autoconfiguration was moved/removed. This configuration | ||
| * provides the bean for testing purposes. | ||
| */ | ||
| @Configuration | ||
| public class WebClientTestConfiguration { | ||
|
|
||
| @Bean | ||
| public WebClient.Builder webClientBuilder() { | ||
| return WebClient.builder(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,16 @@ | |
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-web</artifactId> | ||
| <exclusions> | ||
| <exclusion> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-starter-jackson</artifactId> | ||
|
Comment on lines
16
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Similar to the client module, Useful? React with 👍 / 👎. |
||
| </exclusion> | ||
| </exclusions> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
| <artifactId>spring-boot-jackson2</artifactId> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.springframework.boot</groupId> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webflux starter still pulls in Jackson 3 via
spring-boot-starter-json, notspring-boot-starter-jackson, so this exclusion is a no-op. With the newspring-boot-jackson2dependency in the same pom, Maven will still resolve the Jackson artifacts from the webflux starter (3.x), so the compatibility layer never takes effect and you end up running against Jackson 3—the very scenario this change is trying to avoid. Please exclude the actual JSON starter or override the Jackson BOM to 2.x so the classpath aligns with the compatibility module.Useful? React with 👍 / 👎.