This code does not work:
@Configuration
public class RepositoryRestMvcConfig extends RepositoryRestMvcConfiguration {
...
@Bean
@Override
public ObjectMapper objectMapper() {
ObjectMapper mapper = super.objectMapper();
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);
return mapper;
}
...
}
How to configure Jackson property naming strategy with JavaConfig?
You can use below approach for naming strategy :
Solution: