I cannot believe how little info there is on using multiple Datasources in Spring Boot. Out of the box, Spring Boot makes it very easy to configure the default Datasource: tweak a few properties for spring.datasource.*
and I’m done.
However, if I want to use multiple datasources, very little documentation/instruction is available. The pieces are all there, but there is just no documentation. Even Manning’s Spring Boot in Action doesn’t have anything on the topic.
Well. After some searching and experimenting, I finally figured it out. Here are my findings: http://www.therealvan.com/multidsdemo.html