You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add additional "query builder" features to UriTemplate [SPR-5973] #10641
Add additional "query builder" features to UriTemplate. The UrlTag already duplicates some features of UriTemplate, and I want to get the same features in Freemarker (#10606). A good starting point would be a common place to get the parameter-appending feature that is needed in the UI. A method like
public URI expandAndAppend(List<ParameterValue> parameters) {
...
}
would work generically. The ParameterValue is a new convenience class containing a name and value pair. The "append" piece could also be separated out for use on its own, but the combined method is needed to get the feature needed in UrlTag (replace placeholders and append the query parameters that are not used in replacement).
Convenience methods that allow the user to pass in a Map<String,String> (in the case where multi-valued parameters are not needed) would also help.
This is now complete, through the introduction of the UriComponents class and UriComponentsBuilder, which offer URI building facilities, superior encoding, and uri template expansion.
Activity
spring-projects-issues commentedon Aug 2, 2009
Dave Syer commented
Attached proposal UriBuilder.java
spring-projects-issues commentedon Aug 2, 2009
Dave Syer commented
Attached test cases UriBuilderTests.java
spring-projects-issues commentedon Sep 15, 2011
Arjen Poutsma commented
This is now complete, through the introduction of the UriComponents class and UriComponentsBuilder, which offer URI building facilities, superior encoding, and uri template expansion.