我正在尝试用Quarkus实现多租户,就像here描述的那样。我在application.properties
文件中添加了quarkus.hibernate-orm.multitenant=DATABASE
并实现了io.quarkus.hibernate.orm.runtime.tenant.TenantResolver
。但是当我尝试使用EntityManager
时,我得到了这样的异常:
org.hibernate.HibernateException: SessionFactory configured for multi-tenancy, but no tenant identifier specified
并且我的TenantResolver
实现没有被使用。我是不是遗漏了什么?
发布于 2020-08-14 01:00:50
创建假的默认数据源,示例:
quarkus.datasource.db-kind = postgresql
quarkus.datasource.username = 1
quarkus.datasource.password = 1
quarkus.datasource.jdbc.url = 1
https://stackoverflow.com/questions/63191283
复制相似问题