Skip to content

fix: Spring Boot 4.0 breaking changes — migrate to Jackson 3 Kafka serializers#92

Merged
JP-Ellis merged 2 commits intorenovate/major-spring-bootfrom
copilot/sub-pr-74
Mar 4, 2026
Merged

fix: Spring Boot 4.0 breaking changes — migrate to Jackson 3 Kafka serializers#92
JP-Ellis merged 2 commits intorenovate/major-spring-bootfrom
copilot/sub-pr-74

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Spring Boot 4.0 drops Jackson 2 (com.fasterxml.jackson) in favor of Jackson 3 (tools.jackson), breaking compilation due to missing TypeReference and ObjectMapper classes. Spring Kafka 4.0 deprecates JsonDeserializer/JsonSerializer in favor of Jackson 3-native replacements.

Changes

  • KafkaConfiguration.java

    • Replace JsonDeserializer / JsonSerializer (Spring Kafka, Jackson 2-based) with JacksonJsonDeserializer
    • Fix pre-existing bug: JsonSerializer.class was incorrectly set as VALUE_DESERIALIZER_CLASS_CONFIG
  • ProductsPactTest.java

    • Update ObjectMapper import: com.fasterxml.jackson.databindtools.jackson.databind
// Before
import org.springframework.kafka.support.serializer.JsonDeserializer;
import org.springframework.kafka.support.serializer.JsonSerializer;
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JsonSerializer.class); // bug: wrong class
return new DefaultKafkaConsumerFactory<>(props, new StringDeserializer(), new JsonDeserializer<>(Product.class));

// After
import org.springframework.kafka.support.serializer.JacksonJsonDeserializer;
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JacksonJsonDeserializer.class);
return new DefaultKafkaConsumerFactory<>(props, new StringDeserializer(), new JacksonJsonDeserializer<>(Product.class));

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…ckson 3

Co-authored-by: JP-Ellis <3196162+JP-Ellis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.spring.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Chore: Update plugin org.springframework.boot to version 4 fix: Spring Boot 4.0 breaking changes — migrate to Jackson 3 Kafka serializers Mar 4, 2026
@JP-Ellis JP-Ellis marked this pull request as ready for review March 4, 2026 00:50
@JP-Ellis JP-Ellis merged commit 86f74b0 into renovate/major-spring-boot Mar 4, 2026
5 checks passed
@JP-Ellis JP-Ellis deleted the copilot/sub-pr-74 branch March 4, 2026 00:50
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