Jackson is ignoring spring.jackson.property-naming-strategy=SNAKE_CASE. I am using springBootVersion 1.4.2.RELEASE. In my application.properties file, I have added
Just like @skadya's answer, I update it in new spring version and Java 8 styles.
@EnableWebMvc
@Configuration
public class WebConfig implements WebMvcConfigurer {
private ObjectMapper mapper;
@Autowired // spring.jackson.* ObjectMapper's config
public WebConfig(ObjectMapper mapper) {
this.mapper = mapper;
}
@Override
public void extendMessageConverters (List> converters) {
converters.stream()
.filter(x -> x instanceof MappingJackson2HttpMessageConverter)
.forEach(x -> ((MappingJackson2HttpMessageConverter) x).setObjectMapper(mapper));
}
}