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("")中引号中的值出现了相同,导致了上面的错误!原谅我的粗心大意!

猜你喜欢

转载自www.cnblogs.com/caizhen/p/9170350.html
今日推荐