Move MultipartAutoConfigurationTests to main code's module
This commit is contained in:
committed by
Phillip Webb
parent
8efbebb9b3
commit
baadf28fc3
@@ -29,7 +29,3 @@ dependencies {
|
|||||||
|
|
||||||
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
|
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
|
||||||
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -18,8 +18,17 @@ dependencies {
|
|||||||
optional("jakarta.servlet:jakarta.servlet-api")
|
optional("jakarta.servlet:jakarta.servlet-api")
|
||||||
optional("org.springframework.security:spring-security-config")
|
optional("org.springframework.security:spring-security-config")
|
||||||
|
|
||||||
|
testImplementation(project(":spring-boot-project:spring-boot-jetty"))
|
||||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||||
|
testImplementation(project(":spring-boot-project:spring-boot-tomcat"))
|
||||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||||
|
testImplementation(project(":spring-boot-project:spring-boot-undertow"))
|
||||||
|
testImplementation("org.springframework:spring-webmvc")
|
||||||
|
|
||||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||||
|
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("test") {
|
||||||
|
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.boot.autoconfigure.web.servlet;
|
package org.springframework.boot.servlet.autoconfigure;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@@ -28,8 +28,6 @@ import org.junit.jupiter.params.provider.MethodSource;
|
|||||||
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
|
import org.springframework.boot.jetty.servlet.JettyServletWebServerFactory;
|
||||||
import org.springframework.boot.servlet.autoconfigure.MultipartAutoConfiguration;
|
|
||||||
import org.springframework.boot.servlet.autoconfigure.MultipartProperties;
|
|
||||||
import org.springframework.boot.test.util.TestPropertyValues;
|
import org.springframework.boot.test.util.TestPropertyValues;
|
||||||
import org.springframework.boot.testsupport.classpath.ForkedClassPath;
|
import org.springframework.boot.testsupport.classpath.ForkedClassPath;
|
||||||
import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories;
|
import org.springframework.boot.testsupport.web.servlet.DirtiesUrlFactories;
|
||||||
@@ -38,7 +36,6 @@ import org.springframework.boot.tomcat.servlet.TomcatServletWebServerFactory;
|
|||||||
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory;
|
import org.springframework.boot.undertow.servlet.UndertowServletWebServerFactory;
|
||||||
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
|
import org.springframework.boot.web.server.autoconfigure.ServerProperties;
|
||||||
import org.springframework.boot.web.server.servlet.context.AnnotationConfigServletWebServerApplicationContext;
|
import org.springframework.boot.web.server.servlet.context.AnnotationConfigServletWebServerApplicationContext;
|
||||||
import org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
@@ -267,8 +264,7 @@ class MultipartAutoConfigurationTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
@Import({ TomcatServletWebServerAutoConfiguration.class, DispatcherServletAutoConfiguration.class,
|
@Import({ TomcatServletWebServerAutoConfiguration.class, MultipartAutoConfiguration.class })
|
||||||
MultipartAutoConfiguration.class })
|
|
||||||
@EnableConfigurationProperties(MultipartProperties.class)
|
@EnableConfigurationProperties(MultipartProperties.class)
|
||||||
static class BaseConfiguration {
|
static class BaseConfiguration {
|
||||||
|
|
||||||
@@ -279,6 +275,11 @@ class MultipartAutoConfigurationTests {
|
|||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
DispatcherServlet dispatcherServlet() {
|
||||||
|
return new DispatcherServlet();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
Reference in New Issue
Block a user