Multi-Tenancy with Hibernate 7 and Spring Boot 4: @TenantId vs Schema-per-Tenant
Hibernate 7.4 multi-tenancy on Spring Boot 4.1 and PostgreSQL 17, run end to end: @TenantId discriminator vs schema-per-tenant, tenant taken from a signed JWT claim, the search_path leak, one shared pool vs a pool per tenant (measured connection counts), and what happens when no tenant is set.