How to Configure Multiple Data Sources in Spring Boot

Sometimes, just one database isn’t enough. That’s why you need to configure multiple data sources in your Spring Boot app. Unfortunately, it’s not really easy to figure out how to do that. Usually, you’ll configure a single data source in your application properties file with something that looks like this: spring.datasource.url=jdbc:mysql://myhost.com:3306/fishingsupplies spring.datasource.username=bubba spring.datasource.password=password That’s fine…