Skip to content

Commit 8b66fd2

Browse files
committed
GH-1148 Configure our own ObjectMapper
1 parent b17795d commit 8b66fd2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/config/ContextFunctionCatalogAutoConfiguration.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,7 @@ private JsonMapper gson(ApplicationContext context) {
214214
}
215215

216216
private JsonMapper jackson(ApplicationContext context) {
217-
ObjectMapper mapper;
218-
try {
219-
mapper = context.getBean(ObjectMapper.class);
220-
}
221-
catch (Exception e) {
222-
mapper = new ObjectMapper();
223-
}
217+
ObjectMapper mapper = new ObjectMapper();
224218
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
225219
mapper.configure(DeserializationFeature.FAIL_ON_TRAILING_TOKENS, true);
226220
return new JacksonMapper(mapper);

0 commit comments

Comments
 (0)