Neo4J is a provider of Spring Boot for handling Graphical database. Neo4J is a graphical datbase where need to represent stored data in graphical relational forms. You can add Neo4J in your Spring boot application by adding Neo4J starter in your pom.xml (Maven) or build.gradle (Gradle).
Maven
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver-spring-boot-starter</artifactId>
<version>4.3.6.0</version>
</dependency>
Gradle
dependencies {
compile 'org.neo4j.driver:neo4j-java-driver-spring-boot-starter:4.3.6.0'
}
After adding Neo4J starter in your application it will automatically download and add the required dependencies in your application and initialize with default values. You can overwrite these values through application.properties / application.yaml .
Neo4j Configuration Properties
Spring Boot load these properties in Neo4jProperties class.
Name | Default Value | Description |
spring.data.neo4j.compiler | Compiler to use. | |
spring.data.neo4j.embedded.enabled | true | Enable embedded mode when embedded driver is available. |
spring.data.neo4j.password | Login password of the server. | |
spring.data.neo4j.repositories.enabled | true | Enable Neo4j repositories. |
spring.data.neo4j.session.scope | singleton | Scope (lifetime) of the session. |
spring.data.neo4j.uri | URI used by the driver detected by default. | |
spring.data.neo4j.username | Login user of the server. |
References
https://docs.spring.io/spring-boot/docs/1.4.x/reference/html/common-application-properties.html
Happy Learning !!!
You must be logged in to post a comment.