Browse Source

Polishing

pull/36115/head
Sam Brannen 3 weeks ago
parent
commit
06f0f2f317
  1. 9
      spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java

9
spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java

@ -47,10 +47,7 @@ public class RequestMappingVersionIntegrationTests extends AbstractRequestMappin @@ -47,10 +47,7 @@ public class RequestMappingVersionIntegrationTests extends AbstractRequestMappin
@Override
protected ApplicationContext initApplicationContext() {
AnnotationConfigApplicationContext wac = new AnnotationConfigApplicationContext();
wac.register(WebConfig.class, TestController.class);
wac.refresh();
return wac;
return new AnnotationConfigApplicationContext(WebConfig.class, TestController.class);
}
@ -77,9 +74,9 @@ public class RequestMappingVersionIntegrationTests extends AbstractRequestMappin @@ -77,9 +74,9 @@ public class RequestMappingVersionIntegrationTests extends AbstractRequestMappin
.isEqualTo("<https://example.org/deprecation>; rel=\"deprecation\"; type=\"text/html\"");
}
@Test// gh-36059
@Test // gh-36059
void staticResourceWithInvalidApiVersion() throws Exception {
startServer((HttpServer) new TomcatHttpServer());
startServer(new TomcatHttpServer());
String url = "http://localhost:" + this.port + "/cp/test/foo.css";
RequestEntity<Void> requestEntity = RequestEntity.get(url).header("API-Version", "Invalid").build();

Loading…
Cancel
Save