【发布时间】:2018-07-26 06:23:38
【问题描述】:
我使用 QueryDSL 作为 Spring Data Rest 的一部分从我们的 API 中搜索实体。
是否有可能以某种方式过滤搜索 API,以便默认情况下它不会找到例如“停用”的 Car 实体?
目前我在汽车实体上有一个标志,当它设置为 true 时,它不应该通过我们的搜索 API 公开,并且设置了这个属性的汽车应该被排除在搜索之外。
https://docs.spring.io/spring-data/jpa/docs/1.9.0.RELEASE/reference/html/#core.web.type-safe
【问题讨论】:
-
stackoverflow.com/help/how-to-ask - 请提供一些代码(您的域对象、存储库和任何相关代码示例的示例)、输入查询和预期结果。
标签: spring-boot spring-data-rest querydsl