【问题标题】:Spring boot - Stand alone Neo4j弹簧靴 - 独立 Neo4j
【发布时间】:2015-03-09 17:06:39
【问题描述】:

如何通过 Spring boot 连接到外部 neo4j 服务器。我在https://spring.io/guides/gs/accessing-data-neo4j/ 提到了这个例子。更改了以下内容

@Bean
GraphDatabaseService graphDatabaseService() {
    SpringRestGraphDatabase x = null;
    return new SpringRestGraphDatabase("http://localhost:7474/db/data/");
} 

但它不起作用。此外,当我安装 neo4j 时,它似乎受到用户名密码的保护。从spring boot连接neo4j的正确方法是什么

【问题讨论】:

    标签: neo4j spring-boot spring-data-neo4j


    【解决方案1】:

    问题是凭据没有被传递。

    @Bean
    GraphDatabaseService graphDatabaseService() {
        SpringRestGraphDatabase x = null;
    
        return new SpringRestGraphDatabase("http://localhost:7474/db/data/",**"neo4j","nithin"**);
    }
    

    这行得通! .谢谢

    【讨论】:

      猜你喜欢
      • 2017-07-29
      • 2017-07-06
      • 1970-01-01
      • 2017-12-22
      • 2018-02-14
      • 2019-05-03
      • 2021-04-20
      • 1970-01-01
      • 2023-01-07
      相关资源
      最近更新 更多