GH-1148 Configure our own ObjectMapper
This commit is contained in:
@@ -214,13 +214,7 @@ public class ContextFunctionCatalogAutoConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private JsonMapper jackson(ApplicationContext context) {
|
private JsonMapper jackson(ApplicationContext context) {
|
||||||
ObjectMapper mapper;
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
try {
|
|
||||||
mapper = context.getBean(ObjectMapper.class);
|
|
||||||
}
|
|
||||||
catch (Exception e) {
|
|
||||||
mapper = new ObjectMapper();
|
|
||||||
}
|
|
||||||
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
|
mapper.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
|
||||||
return new JacksonMapper(mapper);
|
return new JacksonMapper(mapper);
|
||||||
|
|||||||
Reference in New Issue
Block a user