Zonky嵌入式数据库是否支持Spring Boot 3.0版本?

3
我正在尝试将我的应用程序从Spring Boot 2.7.2迁移到3.0.0版本。在运行集成测试用例时,我遇到了以下错误:
java.lang.NullPointerException: Cannot invoke "org.hibernate.metamodel.mapping.JdbcMapping.getJdbcValueBinder()" because "jdbcMapping" is null
Hibernate ORM核心版本为6.1.5.Final。
请问是否有人在Spring Boot 3.0中使用过zonky库?是否可以提供指导?
我已在pom.xml中添加了以下依赖项:
<dependency>
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-database-spring-test</artifactId>
    <version>2.2.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-postgres</artifactId>
    <version>2.0.2</version>
    <scope>test</scope>
</dependency>
1个回答

0
如果测试类使用了已经包含数据源bean的Spring上下文,那么数据源bean将会被自动替换为测试数据源。新创建的数据源bean将会被注入到所有相关组件中,并且你也可以将其注入到测试类中。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接