我正在使用 Liquibase。我希望在集成测试之前创建数据库表。
代码位于 GitHub 上:https://github.com/rajivj2/example2/
EmployeeJpaDAOIT.java 是包含测试的类。我想做的就是在测试实际开始之前创建表。我可以看到插件在运行时创建表,但集成测试抛出以下异常:
Caused by: org.hibernate.HibernateException: Missing table: employee
你能帮忙吗?
最佳答案
<phase>pre-integration-test</phase>
<goals>
<goal>update</goal>
</goals>
</phase>
为什么你有目标:更新?
关于java - Liquibase liquibase-maven-plugin 创建表,但在集成测试中找不到表 : org. hibernate.HibernateException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26176292/