From 5c3a4b7fd028b43e8b4646781930640d666b7349 Mon Sep 17 00:00:00 2001 From: ggmaleva Date: Thu, 8 Apr 2021 16:22:34 +0300 Subject: [PATCH] fix mapper --- .../java/com/rbkmoney/orgmanager/config/AppConfig.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/rbkmoney/orgmanager/config/AppConfig.java b/src/main/java/com/rbkmoney/orgmanager/config/AppConfig.java index 1aebb8a..4d4dc57 100644 --- a/src/main/java/com/rbkmoney/orgmanager/config/AppConfig.java +++ b/src/main/java/com/rbkmoney/orgmanager/config/AppConfig.java @@ -5,19 +5,16 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.rbkmoney.orgmanager.controller.converter.InvitationStatusConverter; import org.openapitools.jackson.nullable.JsonNullableModule; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.format.support.FormattingConversionService; @Configuration public class AppConfig { - @Bean - public ObjectMapper objectMapper() { - ObjectMapper mapper = new ObjectMapper(); + @Autowired + public void objectMapper(ObjectMapper mapper) { mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.registerModule(new JsonNullableModule()); - return mapper; } @Autowired