【发布时间】:2017-10-03 18:55:50
【问题描述】:
设置
我通过
从我的 Java 项目中导入一个类import myproj.domain.ActionResponse;
然后我尝试通过扩展 Neo4jRepository 为存储库创建一个接口。
我正在关注这些文档:
"参数类型从<T> 更改为<T, ID>" - https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/
@Repository
public interface ActionResponseRepository extends Neo4jRepository<ActionResponse, ActionResponse.getId() > {
...
ActionResponse 扩展了 NamedType,它扩展了具有
的 GraphType...
@GraphId
@JsonProperty("id")
Long id;
public Long getId() {
return id;
}
...
问题
这个:
extends Neo4jRepository<ActionResponse, ActionResponse.getId() > 语法不正确。
如何使用 ActionReponse 类中的 id 填充第二个参数字段?
【问题讨论】:
标签: java neo4j spring-data-neo4j spring-data-neo4j-5