Skip to content

Commit f3b5e6b

Browse files
committed
Adapt to removal of static resource location filtering
See gh-28506
1 parent 85e0643 commit f3b5e6b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/WebFluxAutoConfigurationTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import org.springframework.core.Ordered;
5151
import org.springframework.core.annotation.Order;
5252
import org.springframework.core.convert.ConversionService;
53+
import org.springframework.core.io.ClassPathResource;
5354
import org.springframework.format.Parser;
5455
import org.springframework.format.Printer;
5556
import org.springframework.format.support.FormattingConversionService;
@@ -150,13 +151,12 @@ void shouldRegisterResourceHandlerMapping() {
150151
SimpleUrlHandlerMapping hm = context.getBean("resourceHandlerMapping", SimpleUrlHandlerMapping.class);
151152
assertThat(hm.getUrlMap().get("/**")).isInstanceOf(ResourceWebHandler.class);
152153
ResourceWebHandler staticHandler = (ResourceWebHandler) hm.getUrlMap().get("/**");
153-
assertThat(staticHandler).extracting("locationValues").asList().hasSize(4);
154-
assertThat(staticHandler.getLocations()).hasSize(1);
155-
assertThat(staticHandler.getLocations().get(0)).hasToString("class path resource [public/]");
154+
assertThat(staticHandler.getLocations()).hasSize(4);
156155
assertThat(hm.getUrlMap().get("/webjars/**")).isInstanceOf(ResourceWebHandler.class);
157156
ResourceWebHandler webjarsHandler = (ResourceWebHandler) hm.getUrlMap().get("/webjars/**");
158-
assertThat(webjarsHandler).extracting("locationValues").asList()
159-
.containsExactly("classpath:/META-INF/resources/webjars/");
157+
assertThat(webjarsHandler.getLocations()).hasSize(1);
158+
assertThat(webjarsHandler.getLocations().get(0))
159+
.isEqualTo(new ClassPathResource("/META-INF/resources/webjars/"));
160160
});
161161
}
162162

0 commit comments

Comments
 (0)