-
Feb 19th, 2013, 03:50 PM
#1
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.
-
Feb 20th, 2013, 07:44 AM
#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.
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
-
Forum Rules