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

Qualifiers in regular expressions in @RequestMapping do not work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.0.5
    • Fix Version/s: 3.1 RC1
    • Component/s: Web
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      One can use regular expression to narrow a path in a RequestMapping, which is nice.

      Unfortunate a regex with a quantifier like

      @RequestMapping("/

      {user}

      /{year:
      d{1,4}}")

      leeds to the following exception:

      org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.util.regex.PatternSyntaxException: Unclosed counted closure near index 7
      (\d{1,4)\Q}\E
             ^
      

      Full stack is attached.

      Thanks and kind regards.

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              michael.simons Michael Simons
              Last updater:
              Rossen Stoyanchev
            • Votes:
              7 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 years, 11 weeks, 4 days ago