Skip to content

Commit d36c8b7

Browse files
authored
Merge pull request #280 from petraselmer/1-0-Update-URI
Changed `localhost` -> `localhost:7687` in examples
2 parents a4a5480 + 252e82c commit d36c8b7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/src/main/java/org/neo4j/docs/driver/Examples.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

examples/src/main/java/org/neo4j/docs/driver/MinimalWorkingExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class MinimalWorkingExample
2828
public static void minimalWorkingExample() throws Exception
2929
{
3030
// tag::minimal-example[]
31-
Driver driver = GraphDatabase.driver( "bolt://localhost", AuthTokens.basic( "neo4j", "neo4j" ) );
31+
Driver driver = GraphDatabase.driver( "bolt://localhost:7687", AuthTokens.basic( "neo4j", "neo4j" ) );
3232
Session session = driver.session();
3333

3434
session.run( "CREATE (a:Person {name:'Arthur', title:'King'})" );

0 commit comments

Comments
 (0)