André Benjamin opened SPR-15141 and commented
For example adding a feature that when someone defines the following class with a field annotated with JsonSerialize:
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
public class Software {
@JsonSerialize(using = LicenseSerializer.class)
private String license;
}
Spring first tries to resolve LicenseSerializer from the beans context, and only when there was not such a bean declared, to let Jackson use its default mechanism of resolving and instantiating the bean.
So if I have:
@Component
public class LicenseSerializer implements JsonSerializer<String> {
}
Spring resolves the serializer from the beans context.
No further details from SPR-15141
Comment From: bclozel
Jackson2ObjectMapperBuilder offers more flexibility there with multiple variants like serializers and serializerByType - registering serializers and deserializers in general, by type, as maps... In Spring Boot this can be done with a Jackson2ObjectMapperBuilderCustomizer bean.
I'm closing this issue as a result.