Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-30-2020 02:43 PM
Can I have an example of java application connecting to neo4j database by specifying a database name? I have multiple databases but need to connect to only one.
This is what I have now, it works but only connects to default neo4j database, and I need to connect to another database:
spring.data.neo4j.uri=neo4j://localhost:7687
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=xxxxxx
10-03-2020 12:27 AM
@adellalin You need to specify the database name as parameter while creating the session like driver.session( database=XXXX)
06-21-2021 02:51 AM
Hello @adellalin ,
I ran into a similar issue. I am using driver session object to create a connection. When i go to create my session before i query i specify the database i want to use by the below command.
Session session = driver.session(SessionConfig.forDatabase(XXXXXXX)))
XXXXXX = being the name of the database you want to use.
All the sessions of the conference are now available online