我通过创建扩展 RepositoryRestMvcConfiguration 的 Java 配置类并将 @RestResource 添加到存储库,将 Spring Data Rest (2.0) 添加到现有 Spring MVC 应用程序。
是否可以更改 Rest API 的基本 URL?例如:
http://localhost:8080/rest/customers
代替
http://localhost:8080/customers
我尝试使用 setBaseURI 覆盖 configureRepositoryRestConfiguration,但它似乎不适用于响应中的所有链接。