How to enable Neo4J browser when using embedded Neo4J with spring-boot? I have enabled the HTTP connector but the webpage returns empty response on http://localhost:7474/browser.
Here is the configuration -
DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory.getCanonicalFile())
.setConfig(GraphDatabaseSettings.default_database, "db")
.setConfig(HttpConnector.enabled, true)
.setConfig(BoltConnector.enabled, true)
.build();
Also I see that DatabaseManagementServiceBuilder
is deprecated, what is the new alternative?
2024-08-05T16:00:00Z
You should modify the configuration below.
DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory.getCanonicalFile())
.setConfig(GraphDatabaseSettings.auth_enabled, true)
// Bolt connector
.setConfig(BoltConnector.enabled, true)
.setConfig(BoltConnector.listen_address, new SocketAddress("localhost", 7687))
// Http connector
.setConfig(HttpConnector.enabled, true)
.setConfig(HttpConnector.listen_address, new SocketAddress("localhost", 7474))
.build();
In addition, the pom.xml
file should introduce the following dependencies. For example:
<!-- https://mvnrepository.com/artifact/org.neo4j/neo4j -->
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>5.22.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.neo4j.client/neo4j-browser -->
<dependency>
<groupId>org.neo4j.client</groupId>
<artifactId>neo4j-browser</artifactId>
<version>5.21.0</version>
</dependency>
You can access http://localhost:7474/browser to enable the Neo4j Browser GUI in Java with embedded Neo4j.