Skip to content

Commit d7a6435

Browse files
committed
Fix AbstractDockerComposeIT
- Remove web dependency from spring-boot-docker-compose - Remove Web configuration from AbstractDockerComposeIT Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
1 parent e87b2ba commit d7a6435

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

spring-ai-spring-boot-docker-compose/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,11 @@
210210
<scope>test</scope>
211211
</dependency>
212212

213-
<dependency>
214-
<groupId>org.springframework.boot</groupId>
215-
<artifactId>spring-boot-starter-web</artifactId>
216-
<scope>test</scope>
217-
</dependency>
218-
219213
<dependency>
220214
<groupId>org.springframework.boot</groupId>
221215
<artifactId>spring-boot-starter-test</artifactId>
222216
<scope>test</scope>
223217
</dependency>
224-
<dependency>
225-
<groupId>org.springframework.boot</groupId>
226-
<artifactId>spring-boot-starter-tomcat</artifactId>
227-
<scope>test</scope>
228-
</dependency>
229218
<dependency>
230219
<groupId>org.testcontainers</groupId>
231220
<artifactId>testcontainers</artifactId>

spring-ai-spring-boot-docker-compose/src/test/java/org/springframework/boot/docker/compose/service/connection/test/AbstractDockerComposeIT.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030

3131
import org.springframework.boot.SpringApplication;
3232
import org.springframework.boot.SpringApplicationShutdownHandlers;
33-
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
33+
import org.springframework.boot.WebApplicationType;
3434
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
3535
import org.springframework.boot.testsupport.DisabledIfProcessUnavailable;
36-
import org.springframework.boot.web.server.autoconfigure.servlet.ServletWebServerConfiguration;
3736
import org.springframework.context.annotation.Configuration;
3837
import org.springframework.core.io.ClassPathResource;
3938
import org.springframework.core.io.Resource;
@@ -73,6 +72,7 @@ static void shutDown() {
7372

7473
protected final <T extends ConnectionDetails> T run(Class<T> type) {
7574
SpringApplication application = new SpringApplication(Config.class);
75+
application.setWebApplicationType(WebApplicationType.NONE);
7676
Map<String, Object> properties = new LinkedHashMap<>();
7777
properties.put("spring.docker.compose.skip.in-tests", "false");
7878
properties.put("spring.docker.compose.file",
@@ -97,7 +97,6 @@ private File transformedComposeFile(File composeFile, DockerImageName imageName)
9797
}
9898

9999
@Configuration(proxyBeanMethods = false)
100-
@ImportAutoConfiguration(ServletWebServerConfiguration.class)
101100
static class Config {
102101

103102
}

0 commit comments

Comments
 (0)