本例: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