Skip to content

Instantly share code, notes, and snippets.

@finsterthecat
Created January 5, 2018 23:12
Show Gist options
  • Save finsterthecat/32b57f52e0c5a4b83e2a44300577abb2 to your computer and use it in GitHub Desktop.
Save finsterthecat/32b57f52e0c5a4b83e2a44300577abb2 to your computer and use it in GitHub Desktop.
package io.navan.heroesbackend;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter;
import io.navan.heroesbackend.Hero;
@Configuration
public class RepositoryConfig extends RepositoryRestConfigurerAdapter {
@Override
public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
config.exposeIdsFor(Hero.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment