Skip to content

Feign Jackson auto-configuration fails without Jackson 3 databind #1407

Description

@ikjeong

Describe the bug
With Spring Boot 4.0.8, Spring Cloud OpenFeign 5.0.3, and Spring Data Commons 4.0.7, an application without tools.jackson.core:jackson-databind fails to start.

java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.openfeign.FeignAutoConfiguration.cachingCapability
...
Caused by: java.lang.NoClassDefFoundError: tools/jackson/databind/JacksonModule
...

Actual:

@ConditionalOnClass found required classes 'java.lang.Module', 'org.springframework.data.domain.Page', 'org.springframework.data.domain.Sort'

Expected:

@ConditionalOnClass did not find required class 'tools.jackson.databind.JacksonModule'

The application should start without registering the Page/Sort Jackson modules.
The Jackson 3 migration removed the Jackson 2 Module import but left Module.class, which now resolves to java.lang.Module.

Sample

  1. Use Spring Boot 4.0.8 with OpenFeign 5.0.3 and Spring Data Commons 4.0.7.
  2. Verify that tools.jackson.core:jackson-databind is not on the runtime classpath.
  3. Start the application without setting spring.cloud.openfeign.autoconfiguration.jackson.enabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions