With Spring Data REST, I'd like to change the path of a specific resource to be under a prefix i.e http://example.net/api/customprefix/myresource
vs. http://example.net/api/myresource
I'm aware of how to change the base path of my Spring Data REST project using the spring.data.rest.base-path
directive in application.properties
, and this is currently set to /api
I have tried the following but I'm getting a 404 at http://example.net/api/customprefix/myresource
@RepositoryRestResource(path = "customprefix/myresource", collectionResourceRel = "myresources")
public interface MyResourceRepository extends PagingAndSortingRepository<MyResource, UUID> { }
Is it possible to set a custom prefix for a resource or group of resources with Spring Data REST?