Revert "GH-1148 Configure our own ObjectMapper"

This reverts commit 8b66fd29
This commit is contained in:
Lars Bilger
2024-07-17 09:22:51 +02:00
committed by Oleg Zhurakousky
parent 1686e24200
commit 01c3fb07ef

View File

@@ -214,8 +214,14 @@ public class ContextFunctionCatalogAutoConfiguration {
}
private JsonMapper jackson(ApplicationContext context) {
ObjectMapper mapper = new ObjectMapper();
mapper.registerModule(new JavaTimeModule());
ObjectMapper mapper;
try {
mapper = context.getBean(ObjectMapper.class);
}
catch (Exception e) {
mapper = new ObjectMapper();
}
mapper.registerModule(new JavaTimeModule());
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);