Jackson config

This commit is contained in:
Timo Bejan 2023-06-27 23:37:20 +03:00
parent 40a66a640b
commit 2889d68d79

View File

@ -13,6 +13,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
@Configuration
@ -33,10 +34,12 @@ public class MultiTenancyMessagingConfiguration {
public Jackson2JsonMessageConverter producerJackson2MessageConverter() {
ObjectMapper mapper = new ObjectMapper().findAndRegisterModules();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
return new Jackson2JsonMessageConverter(mapper);
}
@Bean
public static BeanPostProcessor multitenancyBeanPostProcessor() {