@DynamicPropertySource
    static void configureProperties(DynamicPropertyRegistry registry) {
        registry.add("spring.datasource.url", postgres::getJdbcUrl);
        registry.add("spring.datasource.username", postgres::getUsername);
        registry.add("spring.datasource.password", postgres::getPassword);
    }
postgres:15-alpine
PostgreSQL version 15 using the lightweight Alpine Linux as the base image
spring-boot-testcontainers/src/test/java/com/mkyong/book/BookControllerOldWayTest.java