From 06f0f2f317a813dd603489e7ccacf6934ad69b8e Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 8 Jan 2026 18:32:57 +0100 Subject: [PATCH] Polishing --- .../RequestMappingVersionIntegrationTests.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java index ef5973388ee..f155b983ec3 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingVersionIntegrationTests.java @@ -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("; 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 requestEntity = RequestEntity.get(url).header("API-Version", "Invalid").build();