This is a Spring Boot multi-tenant sample using multiple datasources to persist data in different schemas. That is using the Hibernate multi-tenancy support working with the separate database strategy.
Being Maven centric, you can compile and package it without tests using:
mvn clean package -Dmaven.test.skip=true
Once you have your jar file, you can run it.
To run it you can go to the Maven target folder generated and execute the following command:
java -jar multitenant-XXX.jar
Once started you can go and request the data using different tenants :
curl -X GET http://localhost:8080/products
curl -X GET -H "tenant:secondDS" http://localhost:8080/products
curl -X GET -H "tenant:thirdDS" http://localhost:8080/products