Spring DATA Neo4J - Environment



In this chapter, we will discuss how to setup a Maven Java Project in Eclipse IDE to work with Spring DATA Neo4j module to develop Spring Framework application.

Step 1 - Create a Maven project in Eclipse IDE

Neo4j CQL Tutorial

Step 2 - Open pom.xml file in Eclipse IDE and add the following major dependencies

Spring DATA Neo4j Module Jar file

<dependency>
   <groupId> org.springframework.data </groupId>
   <artifactId> spring-data-neo4j </artifactId>
   <version> 3.1.2.RELEASE </version>
</dependency>

Neo4j Jar file which used by Spring DATA Neo4j Module Jar file internally

<dependency>
   <groupId> org.neo4j </groupId>
   <artifactId> neo4j-kernel </artifactId>
   <version> 2.1.3 </version>
</dependency>

Java Transaction API jar file which used by Spring DATA Neo4j Module Jar file internally

<dependency>
   <groupId> javax.transaction </groupId>
   <artifactId> jta </artifactId>
   <version> 1.1 </version>
</dependency>

Java Validation API jar file which used by Spring DATA Neo4j Module Jar file internally

<dependency>
   <groupId> javax.validation </groupId>
   <artifactId> validation-api </artifactId>
   <version> 1.0.0.GA </version>
</dependency>

Step 3 - Complete pom.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
   http://maven.apache.org/xsd/maven-4.0.0.xsd">
   
   <modelVersion> 4.0.0 </modelVersion>
   <groupId> com.tp.neo4j </groupId>
   <artifactId> springdata-neo4j </artifactId>
   <version> 1.0 </version>  
   
   <dependencies>
      <dependency>   
         <groupId> org.springframework.data </groupId>
         <artifactId> spring-data-neo4j </artifactId>
         <version> 3.1.2.RELEASE </version>
      </dependency>
      
      <dependency>
         <groupId> org.neo4j </groupId>
         <artifactId> neo4j-kernel </artifactId>
         <version> 2.1.3 </version>
      </dependency>  
      
      <dependency>
         <groupId> javax.transaction </groupId>
         <artifactId> jta </artifactId>
         <version> 1.1 </version>
      </dependency>
      
      <dependency>
         <groupId>javax.validation</groupId>
         <artifactId>validation-api</artifactId>
         <version>1.0.0.GA</version>
      </dependency>
      
   </dependencies>   
</project>

We shall develop a Spring DATA Neo4j Java application to perform some Neo4j DB operations in next chapter using this Eclipse IDE Project setup.

Advertisements