Spring boot 将Neo4J与SpringBoot连接

Spring boot 将Neo4J与SpringBoot连接,spring-boot,spring-data-neo4j,Spring Boot,Spring Data Neo4j,我需要帮助将neo4j数据库连接到spring boot。我在谷歌上搜索了一整天,但还是弄不懂。我可以创建一个spring boot应用程序,创建一个调用服务的REST控制器,然后创建spring data JPA SQl存储库,但无法为graph数据库创建,请任何人帮助我将graph数据库配置为spring boot。 我是Neo4j的新手,被分配了一项任务 多谢各位。 我添加了任何教程告诉我的内容: <parent> <groupId>org.springfr

我需要帮助将neo4j数据库连接到spring boot。我在谷歌上搜索了一整天,但还是弄不懂。我可以创建一个spring boot应用程序,创建一个调用服务的REST控制器,然后创建spring data JPA SQl存储库,但无法为graph数据库创建,请任何人帮助我将graph数据库配置为spring boot。 我是Neo4j的新手,被分配了一项任务

多谢各位。 我添加了任何教程告诉我的内容:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.4.3.RELEASE</version>
</parent>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-neo4j</artifactId>
        <version>4.2.3.RELEASE</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-neo4j-rest -->
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-neo4j-rest</artifactId>
        <version>3.4.6.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-configuration</artifactId>
        <version>3.2.0-alpha08</version>
    </dependency>


</dependencies>
<properties>
    <start-class>com.sumit.demo.AppBootConfig</start-class>
    <java.version>1.8</java.version>
</properties>
<build>
    <finalName>people</finalName>
</build>
我尝试配置,但得到以下结果:

017-04-25 01:10:03.316  WARN 5772 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.sumit.demo.AppBootConfig]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/data/neo4j/config/Neo4jConfiguration.class] cannot be opened because it does not exist
2017-04-25 01:10:03.323错误5772---[main]o.s.b.f.s.DefaultListableBeanFactory:名为“org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory”的bean上的销毁方法引发异常

java.lang.IllegalStateException:ApplicationEventMulticaster未初始化-通过以下上下文在多播事件之前调用“刷新”:org.springframework.boot.context.embedded。AnnotationConfigEmbeddedWebApplicationContext@2f9f7dcf:启动日期[2017年4月25日星期二01:10:02 IST];上下文层次结构的根 位于org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.ApplicationListenerDetector.PostProcessBeforeDestroyment(ApplicationListenerDetector.java:97)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)~[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 位于org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:959)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.beans.factory.support.DefaultListableBeanFactory.DestroySingleton(DefaultListableBeanFactory.java:966)[spring-beans-4.3.5.RELEASE.jar:4.3.5.RELEASE] 位于org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555)[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 位于org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:315)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)[spring-boot-1.4.3.RELEASE.jar:1.4.3.RELEASE] 在com.sumit.demo.AppBootConfig.main(AppBootConfig.java:15)[classes/:na]

2017-04-25 01:10:03.334错误5772---[main]o.s.boot.SpringApplication:应用程序启动失败

org.springframework.beans.factory.BeanDefinitionStoreException:无法处理配置类[com.sumit.demo.AppBootConfig]的导入候选项;嵌套异常为java.io.FileNotFoundException:类路径资源[org/springframework/data/neo4j/config/Neo4jConfiguration.class]不存在,无法打开 在org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:541)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser.ProcessDeferreImportSelectors(ConfigurationClassParser.java:475)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.postprocessorregistrationlegate.invokeBeanDefinitionRegistryPostProcessors(postprocessorregistrationlegate.java:270)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.postprocessorregistrationlegate.invokeBeanFactoryPostProcessors(postprocessorregistrationlegate.java:93)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)~[spring-context-4.3.5.RELEASE.jar:4.3.5.RELEASE] 位于org.springframework.boot.context.embedded。
017-04-25 01:10:03.316  WARN 5772 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.sumit.demo.AppBootConfig]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/data/neo4j/config/Neo4jConfiguration.class] cannot be opened because it does not exist
   <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-neo4j</artifactId>
        <version>4.1.5.RELEASE</version>
    </dependency>  
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-neo4j-rest</artifactId>
        <version>3.4.6.RELEASE</version>
</dependency>
@SpringBootApplication
@EnableNeo4jRepositories("com.in.neo4j.repository.neo")  
spring.data.neo4j.uri=bolt://localhost
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=Your_Password
neo4j console
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>