From 9c81c939d7cc27ff690b659583d92ad78ae9633a Mon Sep 17 00:00:00 2001 From: Baptiste Gouhoury Date: Fri, 6 Mar 2020 13:10:50 +0100 Subject: [PATCH] Add bolt+routing support (#168) Added protocol override support for connection --- .../graphdb/database/neo4j/bolt/Neo4jBoltDatabase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database/neo4j/src/main/java/com/neueda/jetbrains/plugin/graphdb/database/neo4j/bolt/Neo4jBoltDatabase.java b/database/neo4j/src/main/java/com/neueda/jetbrains/plugin/graphdb/database/neo4j/bolt/Neo4jBoltDatabase.java index c62898e0..913a1fbd 100644 --- a/database/neo4j/src/main/java/com/neueda/jetbrains/plugin/graphdb/database/neo4j/bolt/Neo4jBoltDatabase.java +++ b/database/neo4j/src/main/java/com/neueda/jetbrains/plugin/graphdb/database/neo4j/bolt/Neo4jBoltDatabase.java @@ -28,7 +28,11 @@ public Neo4jBoltDatabase(Neo4jBoltConfiguration configuration) { Integer port = configuration.getPort(); String username = configuration.getUser(); String password = configuration.getPassword(); - this.url = String.format("bolt://%s:%s", host, port); + if (host.startsWith("bolt://") || host.startsWith("bolt+routing://")) { + this.url = String.format("%s:%s", host, port); + } else { + this.url = String.format("bolt://%s:%s", host, port); + } if (username != null && password != null) { auth = AuthTokens.basic(username, password); } else {