Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jeffsheets
Last active March 23, 2017 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffsheets/f2c2488fdba30b170a760c91dcdd58a9 to your computer and use it in GitHub Desktop.
Save jeffsheets/f2c2488fdba30b170a760c91dcdd58a9 to your computer and use it in GitHub Desktop.
UserRepository showing export false at type level, but export true at method level
//Filed Spring Data Rest bug
//https://jira.spring.io/browse/DATAREST-1034
//so check there for answers
@RepositoryRestResource(path='emUsers', exported = false)
interface EMUserRepository extends EnversRevisionRepository<EMUser, Long, Integer>, JpaSpecificationExecutor<EMUser> {
//Attempting, as an example, to expose only this /search/findByAuth0UserId endpoint
//but with @RepositoryRestResource(exported=false) this endpoint is not exported
//but with @RepositoryRestResource(exported=true) this endpoint is exported
@RestResource(exported = true)
EMUser findByAuth0UserId(String auth0UserId)
@RestResource(exported = false)
List<EMUser> findByAuth0UserIdIn(List<String> auth0UserIds)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment