Sample application to demonstrate Neo4j with Spring Boot Angular Application.
- This repository contains a simple Spring Boot API project and and a basic Angular UI to demonstrate communication with Neo4j graph database.
You need to have below prerequisites available to compile and build API and UI applications on a local developer machine.
- Neo4j Database Instance- Locally hosted Neo4j database instance or a Neo4j Sandbox instance.
- Java-11
- Node
- NPM
- Optional Angular-CLI-7
- In case of a Non Linux operating system, you need to have Docker installed to your system. This is required for Test Execution. This step can be skipped by skipTests variable while packaging.
-
Go to the application.properties file and replace the property variable values with the Neo4j instance information.
-
Build and package the Spring Boot application - Execute below command on shell or command prompt on base directory level.
mvn clean package
If you want to skip Test Cases:
mvn clean package -DskipTests
This command will generate a target directory inside base directory. A packaged JAR file employees-0.0.1-SNAPSHOT.jar is generated on successful execution.
Navigate to the target directory to run the application.
-
Run the Spring Boot API from packaged JAR file
java -jar employees-0.0.1-SNAPSHOT.jar
-
Build and Run the Angular UI application
Navigate to the AngularUI directory.
If you are running the Spring Boot API on a location other than localhost:8080, please change the api base address in the employee.service.ts file under the Angular application.
Execute below commands in their order to download node_modules, compile and run and build application.
npm install
ng serve --open
ng build --prod
Chintan Desai - chintandesai7
Project Link: https://github.com/chintan196/Neo4jSampleApplication