GH-1148 Configure our own ObjectMapper

This commit is contained in:
Oleg Zhurakousky
2024-06-07 08:02:59 +02:00
parent b17795dd66
commit 8b66fd296e

View File

@@ -214,13 +214,7 @@ public class ContextFunctionCatalogAutoConfiguration {
}
private JsonMapper jackson(ApplicationContext context) {
ObjectMapper mapper;
try {
mapper = context.getBean(ObjectMapper.class);
}
catch (Exception e) {
mapper = new ObjectMapper();
}
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
return new JacksonMapper(mapper);