Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spring data rest id missing

@Configuration
public class ExposeEntityIdRestConfiguration extends RepositoryRestMvcConfiguration {

    @Override
    protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
      //add this line to your configuration by default the id is hidden
      //in spring data rest
      config.exposeIdsFor(YourClass.class);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #spring #data #rest #id #missing
ADD COMMENT
Topic
Name
5+8 =