Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-13627

UriTemplate should support regex matching with n times {n} pattern

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.2.3
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      When I create a UriTemplate with the following template string where I am using the n times pattern {2} in the regex

      /site.{domain:co.[a-z]\{2}}

      This fails to match the uri string

      /site.co.eu

      Looks like UriTemplate fails to properly parse the {} of any form within the regular expression

      Similar improvements to parse the {} were recently applied to UriComponents and UriComponentsBuilder here SPR-13311, but the UriTemplate still lacks this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                Reporter:
                iconnj Nikhil
                Last updater:
                Juergen Hoeller
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 42 weeks, 3 days ago