use of org.springframework.web.util.UriComponentsBuilder.fromUriString in project spring-framework by spring-projects.
the class UriComponentsTests method expandWithRegexVar.
// SPR-13311
@Test
public void expandWithRegexVar() {
String template = "/myurl/{name:[a-z]{1,5}}/show";
UriComponents uriComponents = UriComponentsBuilder.fromUriString(template).build();
uriComponents = uriComponents.expand(Collections.singletonMap("name", "test"));
assertEquals("/myurl/test/show", uriComponents.getPath());
}
Aggregations