JPA 存储库按函数名称查询不等于

neb*_*186 0 spring jpa crud

我正在尝试按 Spring (JPA) 中可用的函数名称编写查询。我需要这样的东西select * from table where col1=x AND col2=y AND col3 <> z。下面的函数名是否等价?

findByCol1AndColb2ndCol3IsNot(....)

小智 5

findByCol1AndCol2AndCol3Not -> 你只需要删除 "Is" 。以下页面列出了所有可能的关键字:

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.query-creation