Announcement Announcement Module
No announcement yet.
Issues with Spring 3.2 in resolving request mappings Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issues with Spring 3.2 in resolving request mappings

    We are using
    <spring.version>3.1.3.RELEASE</spring.version> in our project.

    Also for ClassNameHandlerMapping ,the following is used. llerClassNameHandlerMapping

    There are 2 controllers AS FOLLOWS The Exception only happens in the 3.1.3.RELEASE.It is fine in 3.0.5.RELEASE


    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView showhome(HttpServletRequest request) {
    Controller 2
    @RequestMapping(method = RequestMethod.GET)
    public ModelAndView login(final HttpServletRequest request) {

    Caused by: java.lang.IllegalStateException: Ambiguous mapping found EXCEPTION.

    2013-02-19 14:53:02,752[main] [] (org.springframework.web.servlet.mvc.method.annota tion.RequestMappingHandlerMapping) INFO - Mapped "{[],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.ModelAndView ontroller.showhome(javax.servlet.http.HttpServletR equest)

    public org.springframework.web.servlet.ModelAndView er.login(javax.servlet.http.HttpServletRequest)
    to {[],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'catDashboardController' bean method
    public org.springframework.web.servlet.ModelAndView ontroller.showhome(javax.servlet.http.HttpServletR equest) mapped.

  • #2
    Please use [ code][/code ] tags when posting code, that way it remains readable...

    Which spring version is concerned?! 3.0, 3.1 or 3.2... You mention all of them..

    Combining 2 HandlerMappings with the RequestMappingHandlerMapping isn't possible the latter expects all the mapping data to be available through annotations. This is different from the older DefaultAnnotationHandlerMapping which did allow that.