简体   繁体   English

没有找到类型为Event(PropertyReferenceException)的属性findEventsOnSearchCriteria

[英]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类名。

  • Custom interface -> -Custom suffix to repository 定制界面->-到存储库的定制后缀
  • Implementation -> -Impl suffix to repository 实现-> -Impl后缀到存储库

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring JPA:PropertyReferenceException:找不到类型的属性findAll - Spring JPA: PropertyReferenceException: No property findAll found for type Spring Data Envers-PropertyReferenceException:找不到属性Foo类型的修订版 - Spring Data Envers - PropertyReferenceException: No property findRevisions found for type Foo org.springframework.data.mapping.PropertyReferenceException:未找到客户端类型的属性保存 - org.springframework.data.mapping.PropertyReferenceException: No property save found for type Client Java Spring-boot 原因:org.springframework.data.mapping.PropertyReferenceException:找不到类型的属性 ID - Java Spring-boot caused by: org.springframework.data.mapping.PropertyReferenceException: No property id found for type org.springframework.data.mapping.PropertyReferenceException:未找到类型为User的属性更新 - org.springframework.data.mapping.PropertyReferenceException: No property update found for type User 解决org.springframework.data.mapping.PropertyReferenceException:未找到类型MyLog的属性getOne - Resolve org.springframework.data.mapping.PropertyReferenceException: No property getOne found for type MyLog Spring 数据 Rest 错误:原因:org.springframework.data.mapping.PropertyReferenceException:找不到类型项目的属性名称 - Spring Data Rest error: Caused by: org.springframework.data.mapping.PropertyReferenceException: No property name found for type Project Spring Data自定义方法错误:org.springframework.data.mapping.PropertyReferenceException:找不到类型的属性xxx - Spring Data Custom Method Error : org.springframework.data.mapping.PropertyReferenceException: No property xxx found for type 引起:org.springframework.data.mapping.PropertyReferenceException:找不到类型User - Redis的属性findAll - Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type User - Redis 找不到类型属性的属性类型 - No property type found for type property
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM