【发布时间】:2020-02-19 08:57:54
【问题描述】:
我有一个带有休眠功能的 SpringBoot 应用程序。在我的测试中,我想禁用任何类型的数据库连接和配置(测试无权访问数据库)。我该怎么做?
我的测试类用@SpringBootTest 注释并具有@Autowired 属性。
禁用所有数据库交互的正确注释值是什么?
@SpringBootTest
class MyTest {
@Autowired
....
}
【问题讨论】:
标签: hibernate jpa spring-boot-test