package com.ewolff.microservice.customer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.data.rest.core.config.RepositoryRestConfiguration; import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration; import com.fasterxml.jackson.databind.ObjectMapper; @Configuration public class SpringRestDataConfig extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } @Override @Bean @Primary public ObjectMapper objectMapper() { return super.objectMapper(); } }