Following the spring.io example here: http://spring.io/guides/gs/accessing-data-rest/ for exposing a repository as a rest web service works just fine, but I cannot see how to change the URL of the exposed service. The API documentation is a little vague as to what the annotation parameters mean, perhaps some prior knowledge is assumed.
What I want - A HATEOAS service accessed at http://localhost:8080/api/people
for a People repository. I want to achieve this URL using annotations only, not messing with the context root or similar. I tried the following repository annotations:
@RepositoryRestResource(collectionResourceRel = "api/people", path = "people")
@RepositoryRestResource(collectionResourceRel = "people", path = "api/people")
@RepositoryRestResource(collectionResourceRel = "api/people", path = "api/people")
None of these work.
I know I have probably missed the obvious, much appreciate anyone who can point it out.