问题
I am using Spring MVC 3.2.4. I want to extend an existing annotated base controller to override some existing methods. Here is what I want to do,
/**Base Controller**/
@controller
public class BaseController {
@RequestMapping(value="/process")
public String doStuff(){
//do something
}
}
/**Child Controller**/
@controller
public class ChildController extends BaseController {
@RequestMapping(value="/specicalProcess")
public String doStuff(){
//do special thing
super.doStuff();
}
}
But I got "ambiguous mapping found" error. I wonder if Spring MVC doesn't support overriding a super method with @RequestMapping annotation and how I can extend annotated base controller. In my case, I don't want to remove all annotation from base controller to make it work. Any thoughts? Many thanks in advance.
来源:https://stackoverflow.com/questions/22401815/spring-mvc-got-ambiguous-mapping-found-error-when-extending-annotated-base-co