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
- Use Spring Boot 4.0.8 with OpenFeign 5.0.3 and Spring Data Commons 4.0.7.
- Verify that
tools.jackson.core:jackson-databind is not on the runtime classpath.
- Start the application without setting
spring.cloud.openfeign.autoconfiguration.jackson.enabled.
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-databindfails to start.Actual:
Expected:
The application should start without registering the Page/Sort Jackson modules.
The Jackson 3 migration removed the Jackson 2
Moduleimport but leftModule.class, which now resolves tojava.lang.Module.Sample
tools.jackson.core:jackson-databindis not on the runtime classpath.spring.cloud.openfeign.autoconfiguration.jackson.enabled.