[英]No property findEventsOnSearchCriteria found for type Event (PropertyReferenceException)
I use spring-data
to create a repository. 我使用spring-data
创建存储库。 However, when I try to start the project, I got the following error: 但是,当我尝试启动项目时,出现以下错误:
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findEventsOnSearchCriteria found for type Event! 原因:org.springframework.data.mapping.PropertyReferenceException:没有找到类型为Event的属性findEventsOnSearchCriteria!
The source code is shown as below. 源代码如下所示。
EventRepository.java: EventRepository.java:
@Repository
public interface EventRepository extends CrudRepository<Event, String>, EventRepositoryCustom {
}
EventRepositoryCustom.java: EventRepositoryCustom.java:
public interface EventRepositoryCustom {
Event findEventsOnSearchCriteria();
}
EventRepositoryCustomImpl.java: EventRepositoryCustomImpl.java:
public class EventRepositoryCustomImpl implements EventRepositoryCustom {
@Override
public Event findEventsOnSearchCriteria() {
return null;
}
}
Any ideas? 有任何想法吗? Thanks. 谢谢。
Change EventRepositoryCustomImpl.java
class name with EventRepositoryImpl.java
. 使用EventRepositoryImpl.java
更改EventRepositoryCustomImpl.java
类名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.