GH-1148 Copy the context ObjectMapper before modifying it
Resolves #1162
This commit is contained in:
committed by
Oleg Zhurakousky
parent
01c3fb07ef
commit
1cd93cb270
@@ -216,12 +216,12 @@ public class ContextFunctionCatalogAutoConfiguration {
|
||||
private JsonMapper jackson(ApplicationContext context) {
|
||||
ObjectMapper mapper;
|
||||
try {
|
||||
mapper = context.getBean(ObjectMapper.class);
|
||||
mapper = context.getBean(ObjectMapper.class).copy();
|
||||
}
|
||||
catch (Exception e) {
|
||||
mapper = new ObjectMapper();
|
||||
}
|
||||
mapper.registerModule(new JavaTimeModule());
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user