我升级了我的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();
}
}这个问题有什么解决办法吗?
发布于 2022-05-31 09:19:17
你可能错过了额外的依赖吗?
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.15.1</version>
<scope>test</scope>
</dependency>https://stackoverflow.com/questions/72433616
复制相似问题