Create a separate section for testcontainers at development time

Closes gh-35856
This commit is contained in:
Moritz Halbritter
2023-11-13 11:16:59 +01:00
parent e5326e18fc
commit 5a3e588da4
21 changed files with 120 additions and 110 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.devtools;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.devtools;
import org.testcontainers.containers.MongoDBContainer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.dynamicproperties;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.dynamicproperties;
import org.testcontainers.containers.MongoDBContainer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.importingcontainerdeclarations;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.importingcontainerdeclarations;
import org.testcontainers.containers.MongoDBContainer;
import org.testcontainers.containers.Neo4jContainer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.importingcontainerdeclarations;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.importingcontainerdeclarations;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.testcontainers.context.ImportTestcontainers;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.launch;
public class MyApplication {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.launch;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.launch;
import org.springframework.boot.SpringApplication;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.launch;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test;
public class MyApplication {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test;
import org.testcontainers.containers.Neo4jContainer;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test;
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test;
import org.springframework.boot.SpringApplication;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.devtools
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.devtools
import org.springframework.boot.devtools.restart.RestartScope
import org.springframework.boot.test.context.TestConfiguration

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.dynamicproperties
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.dynamicproperties
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.context.annotation.Bean;
@@ -32,4 +32,4 @@ class MyContainersConfiguration {
return container
}
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.importingcontainerdeclarations
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.importingcontainerdeclarations
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.boot.testcontainers.context.ImportTestcontainers
@@ -23,4 +23,4 @@ import org.springframework.boot.testcontainers.context.ImportTestcontainers
@ImportTestcontainers(MyContainers::class)
class MyContainersConfiguration {
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.launch
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.launch
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.docs.features.springapplication.MyApplication

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.launch
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.launch
import org.springframework.boot.fromApplication

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.docs.features.springapplication.MyApplication

View File

@@ -14,13 +14,12 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test
import org.testcontainers.containers.Neo4jContainer
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test
import org.springframework.boot.test.context.TestConfiguration
import org.springframework.boot.testcontainers.service.connection.ServiceConnection
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Bean
import org.testcontainers.containers.Neo4jContainer
@TestConfiguration(proxyBeanMethods = false)
class MyContainersConfiguration {
@@ -31,4 +30,4 @@ class MyContainersConfiguration {
return Neo4jContainer("neo4j:5")
}
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.testcontainers.atdevelopmenttime.test
package org.springframework.boot.docs.features.testcontainers.atdevelopmenttime.test
import org.springframework.boot.fromApplication
import org.springframework.boot.with