Warm tip: This article is reproduced from serverfault.com, please click

其他-响应式 neo4j 实现的@CompositeProperty注释

(其他 - @CompositeProperty annotation for reactive neo4j implementation)

发布于 2022-03-04 17:23:31

我想使用 neo4j 从现有的 spring-boot 项目中尝试 neo4j 响应式实现。在迁移到 React 式 neo4j 实现时,我缺少动态属性的复合属性。是否支持@CompositeProperty?还是会在未来的实施中?

请建议如何解决此问题。

我尝试使用以下依赖项。

<dependency>
    <groupId>org.neo4j.springframework.data</groupId>
    <artifactId>spring-data-neo4j-rx-spring-boot-starter</artifactId>
    <version>1.1.1</version>
</dependency>
Questioner
chandra mohan
Viewed
0
meistermeier 2022-03-05 19:02:21

你不应该再使用Spring Data Neo4j R/X了。这是一个WIP项目,最终找到了它的目的地,作为Spring Data Neo4j 5.x(及更早版本)的继任者。在最近的 Spring Boot 版本(从 2.4 开始)中,如果你将 Spring Data Neo4j Boot 启动器添加到依赖项中,你将获得完全重写的 Spring Data Neo4j:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>

是的,它有(https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#custom.conversions.composite-properties@CompositeProperties)

@Node
public class Entity {
    // id etc.

    @CompositeProperty
    private Map<String, String> additionalFields = new HashMap<>();
}

它支持 、 甚至 (erences) 到 bean 实例。prefixconverterconverterRef