【发布时间】:2020-04-16 04:49:41
【问题描述】:
例如 如果我使用 findByEmail,我的 url 看起来像这样 http://localhost:8080/api/carts/search/findByEmail?email=helloworld@gmail.com
如果我在 JPA 存储库中有 deleteByEmail,删除请求的 URL 将如何显示
这就是我的 JPA 的样子
public interface CartRepository extends JpaRepository<Cart, Integer> {
@Transactional
@RestResource(exported = true)
List<Cart> deleteByEmail(String email);
}
【问题讨论】:
-
删除请求的链接如下localhost:8080/api/carts/Delete/deleteByEmail?email=helloworld@gmail.com
-
@MarwenJaffel 我试过它显示 404 resource not fount 错误
标签: json api spring-boot spring-data-jpa