Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的 java spring boot 应用程序中创建一个搜索,并且我正在使用“Spring Data JPA”规范。我想知道如何在“Spring Data jpa”规范中使用多个谓词。这里是我参考的示例。
每个查找只能有 1 个规范。如果您想要更多,则必须将它们与andoror函数链接,例如:
and
or
Predicate orPredicate = builder.or(predicate1, predicate2);