blog-multitenancy
Sample application demonstrating dynamic Multi-tenancy with Spring Boot, Hibernate and Liquibase
File Explorer
Download Latest Version (.zip)- DataSourceConfiguration.java
- LiquibaseConfig.java
- WebConfiguration.java
- AbstractBaseApiController.java
- ApiException.java
- ContentType.java
- NotFoundException.java
- ProductApiController.java
- Product.java
- ErrorMessage.java
- ProductValue.java
- AsyncConfig.java
- TenantAwareTaskDecorator.java
- TenantInterceptor.java
- TenantContext.java
- ProductRepository.java
- ProductService.java
- ProductServiceImpl.java
- MultiTenantServiceApplication.java
- db.changelog-tenant-1.0.yaml
- db.changelog-tenant.yaml
- application.yml
- SpringBootDbIntegrationTest.java
- SpringBootIntegrationTest.java
- ProductApiControllerTest.java
- PostgresqlTestContainer.java
- ProductRepositoryTest.java
- ProductServiceTest.java
- MultiTenantServiceApplicationTests.java
- products.yml
- application-default.yml
- application-integration-test.yml
- application-test.yml
- dbunit.yml
- pom.xml
- README.md
- .gitignore
- docker-compose.yml
- LICENSE
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/callistaenterprise/blog-multitenancy
Downloads the entire project code from GitHub to your computer.
cd blog-multitenancy
Moves into the project folder you just downloaded.
2. Docker
Easy RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker-compose up -d
Runs the command against the services defined in the compose file.
docker-compose down
Runs the command against the services defined in the compose file.
Run docker compose ps to check the containers are Up. If the README mentions a port, open http://localhost:PORT in your browser.
Pulled directly from this repo's README.
3. Maven (Java)
MediumPrerequisites
- Git Needed to download the project code from GitHub.
- JDK (Java) Required to build and run Java projects.
- Maven The build tool used for the mvn command.
cd multi-tenant-service
This project's files live in a subfolder, so move into it first.
mvn clean install
Installs dependencies and builds the project using Maven.
A BUILD SUCCESS message means it worked. The output is created under target/.
// repository documentation
Was this content helpful?
(0 ratings)
