在使用java连接neo4j数据库时

    public static void main(String[] args) throws SQLException {
        Connection con = DriverManager.getConnection("jdbc:neo4j:http://xxxxxx:7474", "neo4j", "斜向下");
        // Querying
        try (Statement stmt = con.createStatement()) {
            ResultSet rs = stmt.executeQuery("MATCH (n) RETURN n");
            while (rs.next()) {
                System.out.println(rs.getString("n"));
            }
        }
    }

 

提示

neo4j-访问提示No authorization header supplied.

 

查找资料http://stackoverflow.com/questions/29828635/neo4j-simple-authentication找到解决方案

neo4j-访问提示No authorization header supplied.

重启:

neo4j-访问提示No authorization header supplied.

运行java

neo4j-访问提示No authorization header supplied.

结果出来了

 远程连接:

在 conf/neo4j-server.properties 中设置org.neo4j.server.webserver.address=0.0.0.0 来启用

 

在 conf/neo4j-server.properties 中设置org.neo4j.server.webserver.address=0.0.0.0 来启用

相关文章:

  • 2022-02-07
  • 2022-12-23
  • 2021-05-06
  • 2022-02-22
  • 2021-09-23
  • 2021-08-29
  • 2021-11-18
  • 2021-11-25
猜你喜欢
  • 2022-12-23
  • 2021-04-19
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
相关资源
相似解决方案