com.playtika.testcontainers 对比 org.testcontainers

com.playtika.testcontainers vs org.testcontainers

我有点困惑,因为我正在尝试模拟一些容器数据库并查看可用的内容,很多人都提到了这两个库,例如这个例子:

https://github.com/mydeveloperplanet/myliquibaseplanet/blob/feature/testcontainers/pom.xml

但是我 运行 在本地管理它们和将它们集成到我的 bitbucket 管道之间存在许多问题。

是否有关于仅启动数据库容器以及这两个库的哪些版本相互兼容的可靠文档。

https://github.com/Playtika/testcontainers-spring-boot is a wrapper around https://github.com/testcontainers/testcontainers-java 为 Spring 引导和预配置容器提供自动配置。

主要库是testcontainers-java,你应该参考它的文档:
https://www.testcontainers.org

此外,Spring Boot 团队在简化集成方面取得了一些重大进展,今天可以非常轻松地将 testcontainers-java 与 Spring Boot:
一起使用 https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-testcontainers