Open
Description
It would be nice to get a working example, how to use and configure two databases in spring boot.
The documentation says, that it is only required to create a datasource configuration with two different datasources.
But this does not work complete. The example application can show how to:
- define and use different
data-${platform}.sql
files to add data to two different test databases - use the datasources in repositories where we define simple an interface which extends from the
CrudRepository
interface - create a test case where data will be written into one datasource and read from another and then mix the result into a controller to deliver both data (via REST for example) to the client
I have not found any "complete" example for this. But it is mentioned in the documentation, that this is easy and supported by spring-boot .. so it would be nice to have such example.