In order to build an application with Spring Data Neo4j and connect to a Neo4j database, you will need a few foundational skills. Then you will set up the tools needed to work with the Spring Data Neo4j library.
Prerequisites
-
Be able to write Java programs. While you can use Spring Data Neo4j with other JVM languages, this course will use Java.
-
Familiarity with Spring projects. This course does not cover how Spring works at a general level, but you can learn more about them from Spring’s website.
-
Complete the Neo4j Fundamentals and Cypher Fundamentals courses. You should be familiar with what a graph is and how to use the Cypher query language to read and write data to Neo4j.
Get started
The repository, neo4j-graphacademy/app-spring-data, has been created for this course. It contains any starter code and resources you need.
You can use a GitHub codespace as an online IDE and workspace for this course. It will automatically clone the course repository and set up your environment.
GitHub Codespaces
You will need to login with a GitHub account. The GitHub Codespaces free monthly usage will cover the duration of this course.
Develop on your local machine
You will need Java 17 or higher installed.
You can check your version by running java -version
.
To download Java, you can choose from many supported vendor options. For example, Azul’s JDK or hOpenJDK.
Clone the github.com/neo4j-graphacademy/app-spring-data repository:
git clone https://github.com/neo4j-graphacademy/app-spring-data
Fork the repository
You can fork the repository and have a copy for future reference.This course uses Maven for dependency management, but the application could migrate to use Gradle instead. Users have valid preferences for either dependency management framework, but for simplicity’s sake, we chose to only pick one for this course.
Install the project using Maven:
cd app-spring-data
./mvnw clean install -U -DskipTests
Pick an IDE of your choice. If you don’t yet have a preference, you can download IntelliJ IDEA Community Edition or Visual Studio Code, are both excellent choices.
You do not need to create a Neo4j database as you will use the provided sandbox instance.
Lesson Summary
In this lesson, you reviewed any prerequisites needed to complete this course and set up your development environment to work with Spring Data and Neo4j.
In the next lesson, you will learn about the layers of the Spring Data Neo4j library.