小编Ian*_*cey的帖子

如何使用Neo4j和spring数据返回多个对象?

我正在尝试使用此查询在计算字段的旁边返回节点对象。从理论上讲,这应该返回一个哈希,我可以访问每个人,然后计数并将其输入速度模板。

MATCH (starter:Person {userId: {0}})<-[r:WORKS_FOR]-(n:Person) OPTIONAL MATCH (n)<-[q:WORKS_FOR]-(p:Person) RETURN {person: n, reporteeCount: count(q)}

我可以在Neo4j浏览器中返回值,但未能成功引用返回类型并在spring-boot中访问Java中的数据。

我们当前的配置是使用PersonRepository访问数据,然后使用PersonService和PersonServiceImpl以便将返回的数据从Neo4j传递到我们的PersonController。

java spring neo4j spring-data-neo4j spring-boot

2
推荐指数
1
解决办法
1160
查看次数

RabbitMQ Spring引导会话错误

我在尝试将RabbitMQ队列消息传递给Spring Boot应用程序时遇到了问题.我正在运行spring数据4并使用Neo4j作为我的数据库.我能够接收并解析从RabbitMQ队列到Spring启动应用程序的JSON字符串.以下是接收者进程的线程更改:

14:19:17.811 [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8080 (http) 14:19:17.813 [main] INFO org.directoryx.Application - Started Application in 4.989 seconds (JVM running for 5.47) 14:19:26.708 [SimpleAsyncTaskExecutor-1] INFO org.directoryx.sync.Receiver - Message Recv'd! {"lastName":"Okuneva", "country":"United States", "city":"New Stantonfort","org":"IT","photo":"profile9.jpg", "active":"true", "managerId":"1502", "title":"Global Integration Orchestrator", "userId":"frokune", "firstName":"Frank", "phone":"(485)544-1782 x913", "id":"6791", "email":"frokune@peoplemaker.com","status":"Employee"} 14:19:26.718 [SimpleAsyncTaskExecutor-1] INFO org.directoryx.sync.Receiver - Update Person: Frank Okuneva

但是当我尝试将传入的JSON保存到Neo4j节点时,应用程序崩溃并出现以下错误:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'receiver': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: …

spring amqp rabbitmq neo4j spring-data-neo4j

2
推荐指数
1
解决办法
672
查看次数

标签 统计

neo4j ×2

spring ×2

spring-data-neo4j ×2

amqp ×1

java ×1

rabbitmq ×1

spring-boot ×1