Ambiguous mapping found. Cannot map 'competeController' bean method

报错:

Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'competeController' bean method

使用SpringMVC时遇到的错误,原因是自己太不仔细了,视图层向控制层传递数据时,在控制层中不同的两个方法上面写了相同的映射路径,

也就是@RequestMapping("")中引号中的值出现了相同,导致了上面的错误!原谅我的粗心大意!

 

posted @ 2018-06-11 22:33  空芯菜  阅读(258)  评论(0编辑  收藏  举报