首页 > 解决方案 > 不能在 DBunit 中使用外部表

问题描述

我的项目正在使用 SpringMVC、MyBatis 和 PostgreSql。

在 postgres 中,我有 2 台服务器:sv1、sv2。

我使用以下方法将一个表从 sv2 导入到 sv1:

import foreign schema public limit to (tbl2) from server sv2 into public;

但是,当使用 DBUnit 进行测试时,我无法将数据插入外部表 tbl2。例外是:

错误 org.dbunit.database.DatabaseDataSet - 在 tableMap=org.dbunit.dataset.OrderedTableNameMap 中找不到表 'tbl2'

如何在 DBUnit 中使用外部表?

标签: postgresqlspring-mvcmybatisdbunit

解决方案


推荐阅读