Croway opened a new pull request, #2018: URL: https://github.com/apache/camel-spring-boot/pull/2018
## Summary [CAMEL-25338](https://issues.apache.org/jira/browse/CAMEL-25338) (related to CAMEL-22857). Adds a new page, `docs/spring-boot/modules/ROOT/pages/jackson.adoc` ("Jackson 2 and Jackson 3"), linked from the nav right after "Starter Configuration". Until now, `docs/spring-boot` had no Jackson guidance, even though Camel Spring Boot moved to Spring Boot 4 (Jackson 3 by default) in 4.19. The page covers: - **Rules** - Only one Camel Jackson line per application. Both starters together fail with `BeanDefinitionOverrideException`. - Starters that bring `camel-jackson` transitively: mongodb, mongodb-gridfs, jq, neo4j, aws-bedrock, google-vertexai, dhis2. Combined with `camel-jackson3-starter`, the classpath order silently decides which data format is used. When Jackson 2 wins, `camel.dataformat.jackson.*` is not applied at all. - Kamelet schema resolution only works with the Jackson 2 modules. - **Upgrading from 4.18 and staying on Jackson 2**: `auto-discover-object-mapper` no longer finds a Spring mapper, so the page explains how to declare your own Jackson 2 mapper or use `spring-boot-jackson2` with the `spring.jackson2.*` prefix. - **Moving to Jackson 3** - Jackson-level changes: linked to the Jackson 3 Migration Guide, JSTEP-2 and the OpenRewrite recipe rather than repeated. - Camel-specific steps: dependencies, Spring Boot customizer renames, Camel configuration (class names, `objectMapper` type, modules, feature-name prefixes that fail on Jackson 3, auto-discovery caveats, `onException` with `JacksonException`), a short table of payload changes, and a final verification. - Keeping the Jackson 2 payload format for Camel only, with a `DataFormatCustomizer` bean. A `JsonMapper` bean is avoided on purpose: it replaces Spring Boot's `@Primary @ConditionalOnMissingBean` `jacksonJsonMapper`, so Spring MVC output would change too. - **Jackson versions**: `camel-spring-boot-bom` does not manage Jackson, so the versions come from the Spring Boot BOM. ## How it was verified Every behavioural statement was reproduced in a standalone Maven project against Camel Spring Boot 4.22.1 and Spring Boot 4.1.1, with one module per classpath scenario (both starters, mixed starters in each declaration order, excluded `camel-jackson`, auto-discovery on Spring Boot 3.5 vs 4.1, `spring-boot-jackson2`, Spring's `JsonMapper` reuse, `builderWithJackson2Defaults()`, `DataFormatCustomizer` vs `JsonMapper` bean). The option behaviour (auto-discovery requiring exactly one mapper, Camel options skipped on a discovered mapper, feature prefix parsing) was also checked in `camel-jackson3`'s `AbstractJacksonDataFormat`. ## Notes for reviewers - The page targets `main`, which publishes to `/camel-spring-boot/next/jackson.html`. I'd like to backport it to `camel-spring-boot-4.22.x` (LTS), which publishes to `/camel-spring-boot/4.22.x/`. `4.18.x` is on Spring Boot 3, so it doesn't apply there. - Data format links use `{csb-camel-components}`, so each branch links to its own component docs version. - Follow-up code fixes (unique starter bean names, a startup warning when both Camel Jackson modules are present, family-specific configurer names, a log when `autoDiscoverObjectMapper` finds no mapper, Jackson 3 schema resolvers for Kamelets) are not part of this PR. _Claude Code on behalf of Croway_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
