Closed
Description
Im trying to autowire my JsonSerializer/JsonDeserializer.
return new Jackson2ObjectMapperBuilder()
.deserializerByType(ObjectX.class, objectXDeserializerBean)
.applicationContext(applicationContext);
It works with the global deserializer objectXDeserializerBean(above), but when deserializing specific fields like the following(below) it doesn't work:
class ObjectY {
@JsonDeserialize(using = ObjectZDeserializer.class)
private ObjectZ myField;
}
The problem is that HypermediaAutoConfiguration is overriding the HandlerInstantiator in jackson2ObjectMapper so the only work around i can do right now is to set spring.hateoas.apply-to-primary-object-mapper=false. WIth that i was forced to abandon hateos in my responses. Can anyone help me with this?