|
50 | 50 | import org.springframework.core.Ordered;
|
51 | 51 | import org.springframework.core.annotation.Order;
|
52 | 52 | import org.springframework.core.convert.ConversionService;
|
| 53 | +import org.springframework.core.io.ClassPathResource; |
53 | 54 | import org.springframework.format.Parser;
|
54 | 55 | import org.springframework.format.Printer;
|
55 | 56 | import org.springframework.format.support.FormattingConversionService;
|
@@ -150,13 +151,12 @@ void shouldRegisterResourceHandlerMapping() {
|
150 | 151 | SimpleUrlHandlerMapping hm = context.getBean("resourceHandlerMapping", SimpleUrlHandlerMapping.class);
|
151 | 152 | assertThat(hm.getUrlMap().get("/**")).isInstanceOf(ResourceWebHandler.class);
|
152 | 153 | 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); |
156 | 155 | assertThat(hm.getUrlMap().get("/webjars/**")).isInstanceOf(ResourceWebHandler.class);
|
157 | 156 | 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/")); |
160 | 160 | });
|
161 | 161 | }
|
162 | 162 |
|
|
0 commit comments