springboot-hibernate-multitenancy /

Filename Size Date modified Message
1.2 KB
19 B
964 B
475 B
939 B
2.5 KB


Spring Boot demo accompanying source code for blog post at http://tech.asimio.net/2017/01/17/Multitenant-applications-using-Spring-Boot-JPA-Hibernate-and-Postgres.html


  • Java 8
  • Maven 3.3.x
  • Postgres server to create a couple of databases or Docker host to start a couple of asimio/db_dvdrental Postgres containers.

Building the artifact

mvn clean package

Running the application from command line

mvn spring-boot:run

Available URLs

curl -v -H "X-TENANT-ID: tenant_1" "http://localhost:8800/demo"
curl -v -H "X-TENANT-ID: tenant_2" "http://localhost:8800/demo"

should result in successful responses.

Who do I talk to?