Results 1 to 2 of 2

Thread: Issues with Spring 3.2 in resolving request mappings

  1. #1

    Default 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.
    org.springframework.web.servlet.mvc.support.Contro 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

    Controller1

    @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 net.jpmchase.mbt.cat.web.controllers.CatDashboardC ontroller.showhome(javax.servlet.http.HttpServletR equest)

    public org.springframework.web.servlet.ModelAndView net.jpmchase.mbt.cat.web.controllers.LoginControll 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 net.jpmchase.mbt.cat.web.controllers.CatDashboardC ontroller.showhome(javax.servlet.http.HttpServletR equest) mapped.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    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.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •