All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.stapi.graphsystem.configuration.SerializationConfiguration Maven / Gradle / Ivy

package ai.stapi.graphsystem.configuration;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;

@AutoConfiguration
public class SerializationConfiguration {
  
  @Bean
  @ConditionalOnBean
  public ObjectMapper lenientObjectMapper(ObjectMapper objectMapper) {
    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    return objectMapper;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy