bean1 TestContainers를 Spring Bean으로 등록해보자 TestContainers 소개와 이어지는 글입니다. 기본 사용법과 단점 인터넷에 올라온 예제에서는 대부분 상속 형태로 TestContainers를 사용한다. @Testcontainers abstract class SampleContainersTest { @Container static GenericContainer postgresSQLContainer = new GenericContainer("postgres"); } public class Sample extends SampleContainersTest { @Test void test() { System.out.println("hello world!"); } } 이 방식의 단점은 여러 클래스에서 상속받은 경우, 각각의 클래스마다 docker run이 .. 2022. 9. 18. 이전 1 다음