1.引入依赖
JDK11,
neo4J4.4.23
<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.15</version><relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>
2.解决springboot与neo4j兼容问题
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-neo4j</artifactId><exclusions><exclusion><artifactId>neo4j-java-driver</artifactId><groupId>org.neo4j.driver</groupId></exclusion></exclusions>
</dependency>
<dependency><groupId>org.neo4j.driver</groupId><artifactId>neo4j-java-driver</artifactId><version>4.4.5</version>
</dependency>