如何将Spring Boot@RepositoryRestResource映射到特定的URL?
2022-09-02 23:56:08
我似乎无法在以下位置以外的任何位置映射我的存储库:
@RepositoryRestResource(collectionResourceRel = "item", path = "item")
public interface ItemRepository extends PagingAndSortingRepository<Item, Long> {
我以为我可以使用:
path = "/some/other/path/item"
但映射无法解析。我得到:
HTTP ERROR 404
Problem accessing /some/other/path/item. Reason:
Not Found
在 spring-data 中,javadoc 被定义为:“导出此资源的路径段。path
我做错了什么?