Polishing

This commit is contained in:
Sam Brannen
2026-01-08 18:32:57 +01:00
parent f16474d585
commit 06f0f2f317
@@ -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
.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();