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