|
|
|
@ -39,7 +39,6 @@ import org.springframework.http.client.ClientHttpRequest;
|
|
|
|
|
import org.springframework.http.client.ClientHttpResponse;
|
|
|
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.test.util.ReflectionTestUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
@ -189,7 +188,7 @@ public class MultipartAutoConfigurationTests {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void containerWithCommonsMultipartResolver() throws Exception {
|
|
|
|
|
public void containerWithCommonsMultipartResolver() {
|
|
|
|
|
this.context = new AnnotationConfigServletWebServerApplicationContext(
|
|
|
|
|
ContainerWithCommonsMultipartResolver.class, BaseConfiguration.class);
|
|
|
|
|
MultipartResolver multipartResolver = this.context
|
|
|
|
@ -207,9 +206,7 @@ public class MultipartAutoConfigurationTests {
|
|
|
|
|
this.context.refresh();
|
|
|
|
|
StandardServletMultipartResolver multipartResolver = this.context
|
|
|
|
|
.getBean(StandardServletMultipartResolver.class);
|
|
|
|
|
boolean resolveLazily = (Boolean) ReflectionTestUtils.getField(multipartResolver,
|
|
|
|
|
"resolveLazily");
|
|
|
|
|
assertThat(resolveLazily).isTrue();
|
|
|
|
|
assertThat(multipartResolver).hasFieldOrPropertyWithValue("resolveLazily", true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void verify404() throws Exception {
|
|
|
|
|