dynamic-datasources icon indicating copy to clipboard operation
dynamic-datasources copied to clipboard

Spring Boot dynamic datasource beans example

Spring Boot Dynamic DataSources Sample

This is one solution for the Stackoverflow question "How do I create beans programmatically in Spring Boot?" . There might be other more simple solutions. :)

Running example:

$ ./gradlew run

Then access the app via a browser (or curl) on http://localhost:8080.