0

I have tried running SDN 4, but still can't seem to make it run without its REST service (web service). I wonder if it is possible to make Neo4j run without REST(Web) service? Currently trying to make an app to do simple CRUD to the database like MyBatis.

Luanne
  • 19,145
  • 1
  • 39
  • 51
kenlz
  • 461
  • 7
  • 22
  • Do you mean you want to use it with neo4j in embedded mode? – Luanne Apr 13 '16 at 06:24
  • @Luanne I was reading this http://neo4j.com/docs/stable/tutorials-java-embedded-setup.html and when I attempt to follow, it seems that newEmbeddedDatabase has been deprecated. I wonder if this is the way to use neo4j with spring without it being a REST server? Thanks! – kenlz Apr 13 '16 at 07:05

1 Answers1

0

SDN 4.1 (4.1.1.RELEASE) supports Neo4j running in embedded mode.

You need the embedded driver dependency:

 <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-ogm-embedded-driver</artifactId>
      <version>2.0.1</version>
    </dependency>

and then you'll configure it. Both auto configuration and java configuration modes are supported. The manual contains information about how to do this: http://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#_configuring_the_embedded_driver

There's a sample application that uses the embedded driver: https://github.com/neo4j-examples/sdn4-university/tree/4.1-embedded

Luanne
  • 19,145
  • 1
  • 39
  • 51