【发布时间】:2018-03-03 12:26:58
【问题描述】:
我一直在使用最新的 Spring Data Neo4j(当前为 5.0.0.RC3)试用 Spring Boot 2(现阶段为 2.0.0.M4),但似乎无法运行。
我收到以下错误:
org.neo4j.ogm.exception.ConfigurationException: Could not load driver class org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver
我不要求嵌入式驱动程序,也不想要一个。我只想用bolt driver,它已经是spring-data-neo4j的依赖了。
我已经发布了一个 project to Github,它是使用来自 Spring Initializr 的输出构建的,可以运行它来暴露错误。
供参考,我的build.gradle如下。我是否错误地配置了我的项目?还是当前的 Spring 和 Neo4j 里程碑版本存在更严重的问题?
buildscript {
ext {
springBootVersion = '2.0.0.M4'
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
version = "0.0.1-SNAPSHOT"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile "org.apache.tomcat.embed:tomcat-embed-jasper"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-data-neo4j"
runtime "org.springframework.boot:spring-boot-devtools"
}
如前所述,其余代码在 Github 中可用。
【问题讨论】:
标签: spring-boot neo4j spring-data-neo4j-4 neo4j-ogm