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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM