I have the following REST repository, whose implementation is generated at runtime by Spring.
@RepositoryRestResource
public interface FooRepository extends
Just an update that I found that saved my life. As said brilliantly by @mathias-dpunkt in this answer https://stackoverflow.com/a/34518166/2836627
Most importantly the RepositoryRestController is aware of the spring data rest base path and will be served under this base path.
So if your base path is "/api" and you are using @RepositoryRestController
you have to ommit "/api" from @RequestMapping