Announcement Announcement Module
Collapse
No announcement yet.
Spring 3.1 Ambiguous RequestMapping on different consumes values Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.1 Ambiguous RequestMapping on different consumes values

    I am using Spring 3.1.1.RELEASE so consumes parameter should have worked.

    When a request is sent to a controller which contains these two methods.
    Code:
        @RequestMapping(method = RequestMethod.POST, value = {"", "/"}, consumes = {"multipart/form-data"})
        public void post() {
        }
    
        @RequestMapping(method = RequestMethod.POST, value = {"", "/"}, consumes = {"!multipart/form-data"})
        public void postNotMultipart() {
        }
    I got
    Code:
    java.lang.IllegalStateException: Ambiguous handler methods mapped...
    Should consumes parameter make the request mapping ambiguous? Could this be a bug since it's something new in this version?
Working...
X