spring-framework / org.springframework.web.util / UriTemplate / match

match

open fun match(uri: String): MutableMap<String, String>

Match the given URI to a map of variable values. Keys in the returned map are variable names, values are variable values, as occurred in the given URI.

Example:

 UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}"); System.out.println(template.match("http://example.com/hotels/1/bookings/42")); 
will print: {hotel=1, booking=42}

Parameters

uri - the URI to match to

Return
a map of variable values