Class SpinJackson2DataFormatCondition
- All Implemented Interfaces:
org.springframework.context.annotation.Condition
The CamundaJacksonFormatConfigurator* beans are compiled against Jackson 2 and call
JacksonJsonDataFormat#getObjectMapper(). Against the Jackson 3 Spin variant — which
publishes the same class name but returns a tools.jackson.databind.ObjectMapper — that
call raises a NoSuchMethodError during engine bootstrap. This condition keeps the beans
from being created in the first place, which is the correct behaviour: Jackson 3 has java.time,
Jdk8 and parameter-names support built into tools.jackson.databind, so there is nothing
left for the configurators to register.
See SpinJacksonSupport for why the discriminator is the getObjectMapper()
return type and not a class-presence check.
This condition is ANDed with the pre-existing
@ConditionalOnMissingClass("spinjar.com.fasterxml.jackson.databind.ObjectMapper"), so it
can never enable a bean that is disabled today — the only configuration whose behaviour
changes is the plain Jackson 3 Spin swap, which currently fails to start at all.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
-
Constructor Details
-
SpinJackson2DataFormatCondition
public SpinJackson2DataFormatCondition()
-
-
Method Details
-
matches
public boolean matches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata) - Specified by:
matchesin interfaceorg.springframework.context.annotation.Condition
-