|
54 | 54 | import org.springframework.core.Ordered;
|
55 | 55 | import org.springframework.core.annotation.Order;
|
56 | 56 | import org.springframework.core.convert.ConversionService;
|
| 57 | +import org.springframework.core.io.ClassPathResource; |
57 | 58 | import org.springframework.format.Parser;
|
58 | 59 | import org.springframework.format.Printer;
|
59 | 60 | import org.springframework.format.support.FormattingConversionService;
|
@@ -164,13 +165,12 @@ void shouldRegisterResourceHandlerMapping() {
|
164 | 165 | SimpleUrlHandlerMapping hm = context.getBean("resourceHandlerMapping", SimpleUrlHandlerMapping.class);
|
165 | 166 | assertThat(hm.getUrlMap().get("/**")).isInstanceOf(ResourceWebHandler.class);
|
166 | 167 | 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); |
170 | 169 | assertThat(hm.getUrlMap().get("/webjars/**")).isInstanceOf(ResourceWebHandler.class);
|
171 | 170 | 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/")); |
174 | 174 | });
|
175 | 175 | }
|
176 | 176 |
|
|
0 commit comments