Demonstrates how to use multiple datasources with Spring Boot
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project includes a fully deployable Spring Boot app that uses multiple data sources.

The app accepts a single POST call that includes customer info. Then, it persists that info and returns a new Customer object with the ID of the persisted data.

If you want to know more, you should follow along with the tutorial.

To use the app, you'll need to reconfigure the MultiTenantManager class and the DataSourceConfig class to include specifics about your own MySQL database tables.

Once you've done that, just pull this project down in Eclipse. Then, you can run it by right-clicking on CustomerManagementApplication and selecting Run As... Java Application.

Once the application is launched, the endpoints for the POST request are:




Note that you'll need to include a request body that looks something like this: { "firstName" : "Joe", "lastName" : "Blow" }