![](/img/trans.png)
[英]Is it possible to edit schema and db name of org.testcontainers.containers.PostgreSQLContainer?
[英]Upgrading org.testcontainers from 1.10.6 to 1.15.1 - PostgreSQLContainer.start() dissapears
我升級了我的 org.testcontainers:
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.15.1</version>
<scope>test</scope>
</dependency>
但后來我不能再使用 start() 方法了:
public class ComponentTest {
public static final PostgreSQLContainer<?> postgreDBContainer = new
PostgreSQLContainer<>("postgres:13");
static {
postgreDBContainer.start();
}
}
這個問題有什么解決辦法嗎?
可能你錯過了額外的依賴?
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.15.1</version>
<scope>test</scope>
</dependency>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.