Skip to content

Commit

Permalink
GH-1148 Configure our own ObjectMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
olegz committed Jun 7, 2024
1 parent b17795d commit 8b66fd2
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,7 @@ private JsonMapper gson(ApplicationContext context) {
}

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);
Expand Down

0 comments on commit 8b66fd2

Please sign in to comment.