Learn how to interact with Neo4j from Java using the Neo4j Java Driver
This repository accompanies the Building Neo4j Applications with Java course on Neo4j GraphAcademy.
For a complete walkthrough of this repository, enroll now.
-
Clone repository
-
Install sdkman to manage JDK and Maven
sdk install java 17-open sdk use java 17-open sdk install maven mvn verify
Connection details to your neo4j database are in
src/main/resources/application.properties
APP_PORT=3000 NEO4J_URI=bolt://<hostname-or-ip>:7687 NEO4J_USERNAME=neo4j NEO4J_PASSWORD=<password> JWT_SECRET=secret SALT_ROUNDS=10
Run the application
mvn compile exec:java
You may spot a number of comments in this repository that look a little like this:
// tag::something[] someCode() // end::something[]
We use Asciidoc to author our courses. Using these tags means that we can use a macro to include portions of code directly into the course itself.
From the point of view of the course, you can go ahead and ignore them.