Spring-data-neo4j-4 关系公共属性

Spring-data-neo4j-4 Relationships common properties

我想知道是否有一种方法可以指定关系的公共属性列表,而无需每次都定义新的 RelationshipEntity

您可以在抽象 class 中定义公共属性,确保 @RelationshipEntity 注释在子 class 中定义。

但是,这仍然不能消除您可能拥有许多 @RelationshipEntity 个子class 的事实。我假设这就是您的意思,但如果不是,请编辑您的问题以添加更多 info/an 示例