@@ -41,7 +41,7 @@ public class Examples
4141 public static Driver constructDriver () throws Exception
4242 {
4343 // tag::construct-driver[]
44- Driver driver = GraphDatabase .driver ( "bolt://localhost" , AuthTokens .basic ("neo4j" , "neo4j" ) );
44+ Driver driver = GraphDatabase .driver ( "bolt://localhost:7687 " , AuthTokens .basic ("neo4j" , "neo4j" ) );
4545 // end::construct-driver[]
4646
4747 return driver ;
@@ -51,7 +51,7 @@ public static Driver configuration() throws Exception
5151 {
5252 // tag::configuration[]
5353 Driver driver = GraphDatabase .driver (
54- "bolt://localhost" ,
54+ "bolt://localhost:7687 " ,
5555 AuthTokens .basic ("neo4j" , "neo4j" ),
5656 Config .build ().withMaxSessions ( 10 ).toConfig () );
5757 // end::configuration[]
@@ -215,7 +215,7 @@ public static void notifications( Session session ) throws Exception
215215 public static Driver requireEncryption () throws Exception
216216 {
217217 // tag::tls-require-encryption[]
218- Driver driver = GraphDatabase .driver ( "bolt://localhost" , AuthTokens .basic ("neo4j" , "neo4j" ),
218+ Driver driver = GraphDatabase .driver ( "bolt://localhost:7687 " , AuthTokens .basic ("neo4j" , "neo4j" ),
219219 Config .build ().withEncryptionLevel ( Config .EncryptionLevel .REQUIRED ).toConfig () );
220220 // end::tls-require-encryption[]
221221
@@ -225,7 +225,7 @@ public static Driver requireEncryption() throws Exception
225225 public static Driver trustOnFirstUse () throws Exception
226226 {
227227 // tag::tls-trust-on-first-use[]
228- Driver driver = GraphDatabase .driver ( "bolt://localhost" , AuthTokens .basic ("neo4j" , "neo4j" ), Config .build ()
228+ Driver driver = GraphDatabase .driver ( "bolt://localhost:7687 " , AuthTokens .basic ("neo4j" , "neo4j" ), Config .build ()
229229 .withEncryptionLevel ( Config .EncryptionLevel .REQUIRED )
230230 .withTrustStrategy ( Config .TrustStrategy .trustOnFirstUse ( new File ( "/path/to/neo4j_known_hosts" ) ) )
231231 .toConfig () );
@@ -237,7 +237,7 @@ public static Driver trustOnFirstUse() throws Exception
237237 public static Driver trustSignedCertificates () throws Exception
238238 {
239239 // tag::tls-signed[]
240- Driver driver = GraphDatabase .driver ( "bolt://localhost" , AuthTokens .basic ("neo4j" , "neo4j" ), Config .build ()
240+ Driver driver = GraphDatabase .driver ( "bolt://localhost:7687 " , AuthTokens .basic ("neo4j" , "neo4j" ), Config .build ()
241241 .withEncryptionLevel ( Config .EncryptionLevel .REQUIRED )
242242 .withTrustStrategy ( Config .TrustStrategy .trustCustomCertificateSignedBy ( new File ( "/path/to/ca-certificate.pem" ) ) )
243243 .toConfig () );
@@ -249,7 +249,7 @@ public static Driver trustSignedCertificates() throws Exception
249249 public static Driver connectWithAuthDisabled () throws Exception
250250 {
251251 // tag::connect-with-auth-disabled[]
252- Driver driver = GraphDatabase .driver ( "bolt://localhost" ,
252+ Driver driver = GraphDatabase .driver ( "bolt://localhost:7687 " ,
253253 Config .build ().withEncryptionLevel ( Config .EncryptionLevel .REQUIRED ).toConfig () );
254254 // end::connect-with-auth-disabled[]
255255
0 commit comments