Spring Boot Multiple Databases This example shows how to configure multiple databases (jpa+mongo) within a Spring Boot application. Docker is used to create two mongo instances on non-default ports. For JPA two internal h2 databases are used.