General Understanding: Spring + OGM for multiple databases?

Hi!

I'm a hobby genealogist and used neo4j with OGM for my bachelor thesis to build a genealogy application, supporting multiple database folders (which worked correctly)

Because of the very good implementation of repositories (and custom queries) in Spring Data, I tried to switch, but I cannot get my code to work.

It seems like I have some issues with the general understanding on how Springs Repositories work: I don't want a temporary database to startup with the appliation, but to start up after you selected it on a splash screen (or created a new file) and inject the repositories then.

Is that possible with Neo4j-OGM and Spring? If yes, how can I setup the Spring Application to not load an embeddeddriver on startup and rather load an embedded driver when I need it (with a specific database folder attached)?

Sorry if the question is unclear, but my code is too complicated to create a minimal working example (due to JavaFX and everything) - maybe someone can nudge me in the right direction?

Thanks in advance!

Greetings from Germany,

Nico

// EDIT : At the moment, my pom.xml looks like this:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-neo4j</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-neo4j</artifactId>
    </dependency>

    <!-- Neo4j -->
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j</artifactId>
        <version>3.5.9</version>
    </dependency>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-ogm-core</artifactId>
        <version>3.1.14</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-ogm-embedded-driver</artifactId>
        <version>3.1.14</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.neo4j</groupId>
        <artifactId>neo4j-ogm-bolt-driver</artifactId>
        <version>3.1.14</version>
        <scope>compile</scope>
    </dependency>

My full code (which does not work at the moment) is here: https://github.com/niclemon/geneagraph)