use WrappingNeoServerBootstrapper with spring-data-neo4j

点点圈 提交于 2019-11-29 08:59:28

That should be no problem. The config below is not tested, but should work and give you an idea how to set it up.

<neo4j:config graphDatabaseService="gds"/>

<bean id="gds" class="...EmbeddedGraphDatabase">
  <constructor-arg value="target/graph-db"/>
</bean>

<bean id="serverWrapper" class="...WrappingNeoServerBootstrapper" init-method="start" destroy-method="stop">
   <constructor-arg ref="gds"/>
</bean>

Transactions are handled the same way as the Neo4j-REST API does it. One per request. The underlying neo4j-rest-graphdb library also supports the REST-Batch API but that is not yet leveraged in SDN.

Update:

Please also add the dependency for the webadmin static files to your project, something like this:

<dependency>
  <groupId>org.neo4j.app</groupId>
  <artifactId>neo4j-server</artifactId>
  <version>1.5</version>
  <type>jar</type>
  <classifier>static-web</classifier>
</dependency>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!