Skip to content

Add additional "query builder" features to UriTemplate [SPR-5973] #10641

Closed

Description

@spring-projects-issues

Dave Syer opened SPR-5973 and commented

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.


Affects: 3.0 M4

Attachments:

Activity

  1. spring-projects-issues commented on Aug 2, 2009

    @spring-projects-issues
    CollaboratorAuthor

    Dave Syer commented

    Attached proposal UriBuilder.java

  2. spring-projects-issues commented on Aug 2, 2009

    @spring-projects-issues
    CollaboratorAuthor

    Dave Syer commented

    Attached test cases UriBuilderTests.java

  3. spring-projects-issues commented on Sep 15, 2011

    @spring-projects-issues
    CollaboratorAuthor

    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.

  4. added
    type: enhancement
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions