|
51 | 51 | import org.springframework.core.Ordered;
|
52 | 52 | import org.springframework.core.annotation.Order;
|
53 | 53 | import org.springframework.core.convert.ConversionService;
|
| 54 | +import org.springframework.core.io.ClassPathResource; |
54 | 55 | import org.springframework.format.Parser;
|
55 | 56 | import org.springframework.format.Printer;
|
56 | 57 | import org.springframework.format.support.FormattingConversionService;
|
@@ -157,13 +158,12 @@ void shouldRegisterResourceHandlerMapping() {
|
157 | 158 | SimpleUrlHandlerMapping hm = context.getBean("resourceHandlerMapping", SimpleUrlHandlerMapping.class);
|
158 | 159 | assertThat(hm.getUrlMap().get("/**")).isInstanceOf(ResourceWebHandler.class);
|
159 | 160 | ResourceWebHandler staticHandler = (ResourceWebHandler) hm.getUrlMap().get("/**");
|
160 |
| - assertThat(staticHandler).extracting("locationValues").asList().hasSize(4); |
161 |
| - assertThat(staticHandler.getLocations()).hasSize(1); |
162 |
| - assertThat(staticHandler.getLocations().get(0)).hasToString("class path resource [public/]"); |
| 161 | + assertThat(staticHandler.getLocations()).hasSize(4); |
163 | 162 | assertThat(hm.getUrlMap().get("/webjars/**")).isInstanceOf(ResourceWebHandler.class);
|
164 | 163 | ResourceWebHandler webjarsHandler = (ResourceWebHandler) hm.getUrlMap().get("/webjars/**");
|
165 |
| - assertThat(webjarsHandler).extracting("locationValues").asList() |
166 |
| - .containsExactly("classpath:/META-INF/resources/webjars/"); |
| 164 | + assertThat(webjarsHandler.getLocations()).hasSize(1); |
| 165 | + assertThat(webjarsHandler.getLocations().get(0)) |
| 166 | + .isEqualTo(new ClassPathResource("/META-INF/resources/webjars/")); |
167 | 167 | });
|
168 | 168 | }
|
169 | 169 |
|
|
0 commit comments