早上好!
我的Spring应用程序似乎无法检测到存在
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property existsById found for type Planet!
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:77)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:329)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:309)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:272)
存储库中的代码
public boolean existsByIdAndOwnerId(Long planetId, Integer ownerId);
提前致谢!
最佳答案
尝试命名方法:existsPlanetByIdAndOwnerId()
该链接可能有帮助:
https://www.baeldung.com/spring-data-derived-queries