fix mapper

This commit is contained in:
ggmaleva 2021-04-08 16:22:34 +03:00
parent 3d21995d1e
commit 5c3a4b7fd0
No known key found for this signature in database
GPG Key ID: 0E412B78565B108F

View File

@ -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