Announcement Announcement Module
Collapse
No announcement yet.
A bug in AntPathMatcher ?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • A bug in AntPathMatcher ??

    I have two RequestMapping declarations
    @RequestMapping("/conversation/**"))
    at a class level.
    And then in a method a specific annotation
    @RequestMapping(name="/conversation/{conversationId}/dialog/{dialogId}/statement/{statementId}"))
    .

    Now a URI /conversation/123/dialog/1/statement/123 I thought will match the second annotation better than the wild card one. However AntPathMatcher decides otherwise and this manifests itself as a 404 error for me.

    Is this a bug ? I am using Spring 3.0.0-RELEASE.

  • #2
    No it isn't a bug you are mapping it wrong...

    The requestmapping on the method level is a more precise version of the one at class level, so currently your method is mapped at /conversation/conversation/etc...

    Comment


    • #3
      Thanks for the reply,
      I guess my mapping was wrong. But then may be its a different bug.

      Because the following specific annotations are matched everytime (with the class level annotation in place), without any issues
      @RequestMapping(value = "/conversation/{conversationId}", method = RequestMethod.GET)

      @RequestMapping(value = "/conversation/{conversationId}/endpoint/{endPointType}", method = RequestMethod.GET)
      The URIs "conversation/123", "conversation/123/endpoint/agent" hit the right methods.

      Comment

      Working...
      X