Skip to content

Commit ceacb15

Browse files
committed
Merge branch '2.5.x'
2 parents 8ff8290 + b5653ad commit ceacb15

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
@@ -54,6 +54,7 @@
5454
import org.springframework.core.Ordered;
5555
import org.springframework.core.annotation.Order;
5656
import org.springframework.core.convert.ConversionService;
57+
import org.springframework.core.io.ClassPathResource;
5758
import org.springframework.format.Parser;
5859
import org.springframework.format.Printer;
5960
import org.springframework.format.support.FormattingConversionService;
@@ -164,13 +165,12 @@ void shouldRegisterResourceHandlerMapping() {
164165
SimpleUrlHandlerMapping hm = context.getBean("resourceHandlerMapping", SimpleUrlHandlerMapping.class);
165166
assertThat(hm.getUrlMap().get("/**")).isInstanceOf(ResourceWebHandler.class);
166167
ResourceWebHandler staticHandler = (ResourceWebHandler) hm.getUrlMap().get("/**");
167-
assertThat(staticHandler).extracting("locationValues").asList().hasSize(4);
168-
assertThat(staticHandler.getLocations()).hasSize(1);
169-
assertThat(staticHandler.getLocations().get(0)).hasToString("class path resource [public/]");
168+
assertThat(staticHandler.getLocations()).hasSize(4);
170169
assertThat(hm.getUrlMap().get("/webjars/**")).isInstanceOf(ResourceWebHandler.class);
171170
ResourceWebHandler webjarsHandler = (ResourceWebHandler) hm.getUrlMap().get("/webjars/**");
172-
assertThat(webjarsHandler).extracting("locationValues").asList()
173-
.containsExactly("classpath:/META-INF/resources/webjars/");
171+
assertThat(webjarsHandler.getLocations()).hasSize(1);
172+
assertThat(webjarsHandler.getLocations().get(0))
173+
.isEqualTo(new ClassPathResource("/META-INF/resources/webjars/"));
174174
});
175175
}
176176

0 commit comments

Comments
 (0)