Spring异常Ambiguous mapping found.

SpringMVC启动时不停重复加载bean
通过浏览器访问获取异常: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 'onlyOneRestController' bean method
重点截取:nested exception is java.lang.IllegalStateException: Ambiguous mapping found.

原因:Controller层同一请求

解决:查看报错地方,找出同一请求映射到两个方法的请求路径,修改后即可!

你可能感兴趣的:(Spring异常Ambiguous mapping found.)