How to configure multiple schemas with Hibernate
问题 We have got a requirement for multiple schemas in Hibernate. In our project, we need to connect to multiple schemas based on the username and password. But how to configure multiple schemas in Hibernate? Please let me know if there's a way. 回答1: Thanks to Hibernate Multitenancy support, you can easily do that as follows: The following examples can be found in the Hibernate ORM documentation folder. Each schema can be a tenant, so you only need to provide a tenant identifier to the Hibernate