Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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