[英]Liquibase running when contextLoads test in spring boot
當我運行我的 spring 啟動 contextLoads 測試時,由於 liquibase 正在嘗試運行,因此代碼已損壞
Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP
我的 pom 只有財產
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
我應該如何讓我的 liquibase 停止在測試環境中運行?
謝謝。
您可以使用屬性spring.liquibase.enabled=false
禁用liquibase
。 如果您使用的是@SpringBootTest,則可以向其添加屬性。
@SpringBootTest(properties = { "spring.liquibase.enabled=false" })
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.