Ambiguous mapping found. Cannot map 'competeController' bean method

Posted Pretty Boy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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("")中引号中的值出现了相同,导致了上面的错误!原谅我的粗心大意!

 

以上是关于Ambiguous mapping found. Cannot map 'competeController' bean method的主要内容,如果未能解决你的问题,请参考以下文章

Caused by: java.lang.IllegalStateException: Ambiguous mapping found

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'XXXXX' bean

MapStruct - Ambiguous constructors found

Ambiguous mapping. Cannot map *** method 报错解决

Ambiguous mapping. Cannot map *** method 报错解决

记录:Ambiguous mapping. Cannot map ‘eduTeacherController‘ method解决方案