我通过扩展PanacheEntityResource
将REST Data with Panache用于JAX RESTful Web服务生成。在Spring land中有一个query builder mechanism,它允许Spring数据存储库根据自定义方法签名的名称和返回类型生成一个SQL查询。
我正在尝试使用Panache来实现同样的功能,但到目前为止还没有成功。
@ResourceProperties(path = "tasks", paged = false)
public interface TaskResource extends PanacheEntityResource<Task, UUID> {
List<Task> findByOrganizationId(@QueryParam("organizationId") UUID organizationId);
}
我希望将组织ID作为查询参数传递,这样我的请求将为http://localhost:8080/tasks?organizationId=1e7e669d-2935-4d6f-8b23-7a2497b0f5b0
,并且我的响应将返回组织ID与所提供的组织ID匹配的任务列表。是否支持此功能?
发布于 2021-09-28 06:24:15
目前不支持该功能。有关更多详细信息,请参阅https://quarkus.io/guides/rest-data-panache和https://quarkus.io/guides/spring-data-rest
https://stackoverflow.com/questions/69354838
复制相似问题