This is an example application using Spring Data Neo4j and connecting to a Neo4j AuraDB free tier database. You can recreate this project using the following steps:
-
Create a Neo4j AuraDB free instance using dev.neo4j.com/aura-java.
Creating an instance will require creating a user account with Neo4j, but there are no costs for either the account or to create a free tier database instance. Please record the password you create with your instance. It is not shown to you again and will be needed in order to connect the application to the database.
-
Once the database instance is created, load the data in the database.
From the main page in Neo4j AuraDB, there should be a blue button next to the instance. Click this to open Neo4j Browser. At the top of Neo4j Browser window, there is a text input. Copy/paste each statement of the load-data.cypher
script from this project (src/main/resources
) into the text input and click the play button on the right.
-
Once data is loaded, clone this project and open in your preferred IDE.
-
Open this project’s application.properties file and update with your database’s credentials.
The first 3 lines in the application.properties are for URI, username, and password. From the AuraDB console (not Neo4j Browser window), there should be details about your instance, including a line for Connection URI
. The username is defaulted to neo4j
, and the password was shown to you when you created the instance.
Data is from a Kaggle project. It contains movie and tvshow titles, along with credits (persons involved), countries, genres, etc. However, for this demo, we are focusing only on the titles themselves (productions).
An example of the data model is shown below.
PDF versions of accompanying presentations are published to SpeakerDeck.
-
Neo4j AuraDB: Create a FREE instance
-
Blog post: Java17 Sealed classes (Baeldung)
-
Blog post: Java17 Switch pattern matching (Baeldung)
-
Blog post: Java17 InstantSource (Baeldung)