Affects: 5.2.5


System.out.println("template:: " + templateStr);
UriComponents uriComponents = UriComponentsBuilder.fromUriString(templateStr).build();
System.out.println(uriComponents.getPathSegments());

template:: http://localhost/{urlLocale:a-z?}/quotes/1 [{urlLocale:[a-z](]

Looks like the ? in regex is breaking the resolution.

Comment From: dPechman42

Could you please explain what your regex is trying to do. It appears that after the first '?' that the rest of the url is being saved as a query.

Comment From: snicoll

I don't understand why you'd want to use a regexp as a path variable. There is already a warning about the use of special characters in the Javadoc of UriComponentsBuilder#fromUriString.