|
|
|
|
@ -17,6 +17,7 @@ package org.springframework.boot.docs.features.testing.testcontainers.atdevelopm
@@ -17,6 +17,7 @@ package org.springframework.boot.docs.features.testing.testcontainers.atdevelopm
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.devtools.restart.RestartScope |
|
|
|
|
import org.springframework.boot.test.context.TestConfiguration |
|
|
|
|
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; |
|
|
|
|
import org.springframework.context.annotation.Bean |
|
|
|
|
import org.testcontainers.containers.MongoDBContainer |
|
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ class MyContainersConfiguration {
@@ -25,6 +26,7 @@ class MyContainersConfiguration {
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
|
@RestartScope |
|
|
|
|
@ServiceConnection |
|
|
|
|
fun monogDbContainer(): MongoDBContainer { |
|
|
|
|
return MongoDBContainer("mongo:5.0") |
|
|
|
|
} |
|
|
|
|
|