Neo4j(二)整合springmvc

Posted by pandalin on December 12, 2016

官网配置

鉴于官网java相关的例子都是整合springboot

官网配置地址,里面提供了各种例子使用。

整合SDN

SDN名词解释: spring-data-neo4j

以maven为例,spring版本必须选择4.2及以上,低版本会出各种问题

pom

SDN3.X版本 ,选择3.x版本时,出现

问题

配置

configuration

此处造成springbean 循环初始化的问题,通过如下配置即可解决

error error1

在项目classpath中加入ogm.properties配置 DriverConfiguration ogm

关于driver 可参看org.neo4j.ogm.config.DriverConfiguration类说明

建模、定义接口

与官网相同

启动

启动项目,当看到如下信息时,表示整合成功

start


Creative Commons License
This work is licensed under a CC A-S 4.0 International License.