配置了两个sessionfactory,在dao中使用getCurrentSession报错no current session in thread,用openSession报错org.hibernate.service.UnknownServiceException: Unknown service requested ,跟进去发现有一个tenantidentifier的变量为null。求大神解答怎么解决,试过好多方法都没办法解决。
在dao中指定数据源 @PersistenceContext(unitName="xxx")