Skip to content

Instantly share code, notes, and snippets.

Last active March 23, 2017 17:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
UserRepository showing export false at type level, but export true at method level
//Filed Spring Data Rest bug
//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