From 11ebe13b4b3fc51facb7fe18ed1fd720644566d3 Mon Sep 17 00:00:00 2001 From: Vince Bickers Date: Thu, 18 Feb 2016 11:48:09 +0000 Subject: [PATCH] DATAGRAPH-751 - Changes for compatibility with Spring Boot Autoconfiguration requirements. --- .gitignore | 1 + spring-data-neo4j/pom.xml | 17 ++++++++++------- .../resources/{logback.xml => logback-test.xml} | 0 src/main/asciidoc/reference/setup.adoc | 16 ++++++++++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) rename spring-data-neo4j/src/test/resources/{logback.xml => logback-test.xml} (100%) diff --git a/.gitignore b/.gitignore index 75cd44aad..0c534cb81 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ spring-data-neo4j-examples/sdn-boot/bower_components/ .buildpath .project .settings +*/neo4j-home/ target/ .idea/ *.class diff --git a/spring-data-neo4j/pom.xml b/spring-data-neo4j/pom.xml index 9470c7c54..ea44f646b 100644 --- a/spring-data-neo4j/pom.xml +++ b/spring-data-neo4j/pom.xml @@ -26,7 +26,7 @@ 2.3.2 - 2.0.0-M02 + 2.0.0-SNAPSHOT ogm-http.properties @@ -34,18 +34,20 @@ - - org.neo4j - neo4j-ogm-api - ${neo4j.ogm.version} - - org.neo4j neo4j-ogm-core ${neo4j.ogm.version} + + + org.neo4j + neo4j-ogm-http-driver + ${neo4j.ogm.version} + + + org.springframework.data spring-data-commons @@ -83,6 +85,7 @@ test + org.neo4j neo4j-ogm-test diff --git a/spring-data-neo4j/src/test/resources/logback.xml b/spring-data-neo4j/src/test/resources/logback-test.xml similarity index 100% rename from spring-data-neo4j/src/test/resources/logback.xml rename to spring-data-neo4j/src/test/resources/logback-test.xml diff --git a/src/main/asciidoc/reference/setup.adoc b/src/main/asciidoc/reference/setup.adoc index 837ba7e4f..34fce9174 100644 --- a/src/main/asciidoc/reference/setup.adoc +++ b/src/main/asciidoc/reference/setup.adoc @@ -77,7 +77,6 @@ As of 4.1, Spring Data Neo4j provides suppport for connecting to Neo4j using dif - Http driver - Embedded driver -You must configure your application by specifying which driver you want to use to connect to Neo4j. There are two basic ways to do this: using a single properties file, or programmatically. === Properties file @@ -96,6 +95,7 @@ The following sections describe how to configure Spring Data Neo4j using either ==== Configuring the Http Driver The Http Driver connects to and communicates with a Neo4j server over Http. An Http Driver must be used if your application is running in client-server mode. Please note the Http Driver can't be used for spinning up an in-process server. +The Http Driver is the default driver for SDN 4.1, and doesn't need to be explicitly declared in your pom file. .Properties file @@ -136,6 +136,18 @@ _Note: Please see the section below describing the different ways you can pass c The Embedded Driver connects directly to the Neo4j database engine. There is no server involved, therefore no network overhead between your application code and the database. You should use the Embedded driver if you don't want to use a client-server model, or if your application is running as a Neo4j Unmanaged Extension. + +*Please note, if you want to use the Embedded driver in your deployed application, you will need to explicitly declare the required driver dependency in your project's pom file: +* +[source,xml] +---- + + org.neo4j + neo4j-ogm-embedded-driver + ${ogm-version} + +---- + You can specify a permanent data store location to provide durability of your data after your application shuts down, or you can use an impermanent data store, which will only exist while your application is running. .Properties file (permanent data store) @@ -176,7 +188,7 @@ public SessionFactory getSessionFactory() { } ---- -If you want to use an impermanent data store (e.g. for testing) simply omit the URI attribute from the Configuration: +If you want to use an impermanent data store simply omit the URI attribute from the Configuration: [source,java] ----