neo4j-访问提示No authorization header supplied.

时间:2021-08-06 08:47:09

在使用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://*.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 来启用