Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-02-2019 07:12 AM
Currently our Spring Boot Neo4J app connects via the values found in application.properties:
spring.data.neo4j.uri=bolt://neo4j:7687
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=secret
However, we would like this app to be able to connect to multiple Neo4J instances. When a request comes into our controller, we would peel off the spring.data.neo4j.* values and use those to create a dynamic connection instead of using what's in application.properties.
Does anyone have any ideas on how to implement this or some examples?
Thanks!
Solved! Go to Solution.
08-05-2019 08:07 AM
A dynamic approach is not supported by Spring Data Neo4j. The same is valid for most of the Spring Data projects. SDN is not some kind of driver that can switch between instances very easily but needs some kind of guarantee that e.g. related data also ends up in the same database and does not create duplicates within different ones.
07-07-2019 10:30 AM
H Michael,
One easy way to do it is set your auth URI in the environment. Environment variables can be accessed from the *.properties files like so:
spring.data.neo4j.uri=${NEO4J_URI}
08-05-2019 08:07 AM
A dynamic approach is not supported by Spring Data Neo4j. The same is valid for most of the Spring Data projects. SDN is not some kind of driver that can switch between instances very easily but needs some kind of guarantee that e.g. related data also ends up in the same database and does not create duplicates within different ones.
01-15-2020 07:11 AM
Hi Gerrit,
We are moving our project to the enterprise version of Neo4J. Is there still no support for a dynamic approach in Spring Data Neo4J?
01-16-2020 11:12 PM
Hi, no there is still no support and it is still not planned.
All the sessions of the conference are now available online