neo4j关闭和开启密码访问权限

本例:neo4j-enterprise-2.3.1版本

neo4j默认安装是开启访问密码验证

可以发现,在conf/下的neo4j-server.properties配置文件

# Require (or disable the requirement of) auth to access Neo4j
dbms.security.auth_enabled=true

 

true:代表访问时启用安全认证

改成false则表示访问数据时不进行认真

开启如下webserver表示对外提供ip和端口访问

# http port (for all data, administrative, and UI access)
org.neo4j.server.webserver.port=7474
org.neo4j.server.webserver.address=0.0.0.0

 

 

在java程序中使用(这里主要已spring data neo4j为例:4.1.2.RELEASE)

带验证的连接

driver=org.neo4j.ogm.drivers.http.driver.HttpDriver
URI=http://用户名:密码@ip地址:7474

 

不带验证

driver=org.neo4j.ogm.drivers.http.driver.HttpDriver
URI=http://ip地址:7474

 

 

spring data neo4j使用:http://projects.spring.io/spring-data-neo4j/

https://github.com/neo4j-examples/sdn4-university

 

posted @ 2016-11-15 09:27  243573295  阅读(5593)  评论(0编辑  收藏  举报