Java “错误”;PropertyReferenceException:找不到类型“的属性”;将QueryByExampleExecutor添加到存储库时
添加QueryByExampleExecutor时,我收到以下错误: org.springframework.data.mapping.PropertyReferenceException:找不到类型工件的属性Java “错误”;PropertyReferenceException:找不到类型“的属性”;将QueryByExampleExecutor添加到存储库时,java,spring-boot,spring-data,spring-data-neo4j,Java,Spring Boot,Spring Data,Spring Data Neo4j,添加QueryByExampleExecutor时,我收到以下错误: org.springframework.data.mapping.PropertyReferenceException:找不到类型工件的属性 public interface ArtifactRepository扩展了Neo4jRepository,QueryByExampleExecutor 使用以下Spring引导版本: org.springframework.boot spring启动程序父级 2.2.0.1发布 使
public interface ArtifactRepository扩展了Neo4jRepository,QueryByExampleExecutor
使用以下Spring引导版本:
org.springframework.boot
spring启动程序父级
2.2.0.1发布
使用spring-boot-starter-data-neo4j依赖项
存储库
public interface ArtifactRepository扩展了Neo4jRepository,QueryByExampleExecutor{
可选FindGroupId和ByArtifactAndVersion(字符串groupId、字符串artifactId、字符串版本);
列出FindByGroupId和artifactId(字符串groupId、字符串artifactId);
}
人工制品
@NodeEntity
@CompositeIndex(属性={“groupId”、“artifactId”、“version”})
公共类工件{
@身份证
@生成的值(策略=UuidStrategy.class)
私有UUID;
私有字符串groupId;
私有字符串工件;
私有字符串版本;
公共工件(){
}
公共工件(最终字符串groupId、最终字符串工件ID、最终字符串版本){
这个();
this.groupId=groupId;
this.artifactId=artifactId;
this.version=版本;
}
公共UUID getId(){
返回id;
}
...
获取以下堆栈错误:
原因:org.springframework.data.mapping.PropertyReferenceException:找不到类型工件的属性
感谢您的帮助我更深入地研究了一下,属性“exists”来自QueryByExampleExecutor,它是spring数据的东西。只需删除扩展的那一部分,错误就消失了。因此,它似乎与该类的使用直接相关,而不是与建议的问题类似的命名约定。您解决过这个问题吗?没有……我删除了回顾了QueyByExample的使用,此后再也没有回顾过。