Skip to content

Commit

Permalink
Add bolt+routing support (#168)
Browse files Browse the repository at this point in the history
Added protocol override support for connection
  • Loading branch information
Baptiste Gouhoury authored Mar 6, 2020
1 parent 7a18899 commit 9c81c93
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9c81c93

Please # to comment.