This sample project demonstrates how you can map subdomains to Spring MVC controllers in one application. The use-cases are:
- Having a multi-tenancy application with a custom subdomain for each tenant.
- Combining various microsites on different subdomains into the same Spring Boot application.
- Or both of it.
You should have already read my blog post at https://www.schakko.de/2020/06/04/handling-subdomains-in-multi-tenant-applications-with-spring-boot-web-mvc/ to understand what's this all about.
This sample project does **not**
- include any samples how to integrate Spring Security
- include any samples how to use Spring's Reactive features
- include fancy caching algorithms
- deal with @RestController annotations
- fix your CORS problems
- handle each of the corner cases you might think of
- allow annotations on method level but only on class level
It implements the two custom annotations for controller classes:
- @SubdomainController which can handle multiple subdomains like
- @TenantController which expects to resolve the current request to a tenant provided by a repository.
I am also providing a TenantRepository and TenantContext implementation to show how you can deal with subdomains for tenants.
- You can re-use the architecture template in your own projects.
- You should only purchase if you need a working sample project for handling subdomains with Spring Boot / Spring Web MVC. There is no support included and the whole archive comes as-is.
- You should have read my blog post about this topic and understood what I wanted to achieve.
- There is no support or further documentation included.
If you need commercial/enterprise support, please get in contact with me.
You've purchased this product
See it in your libraryView in Library
We charged your card and sent you a receipt
You'll need an account to access this in our app. Please create a password to continue.
Download from the App Store or text yourself a link to the app
Keep on developing!
Good news! Since you already have a Gumroad account, it's also been added to your library.