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

今天启动srpingmvc项目的时候出现了这个异常,

原因: 在同个项目中,我复制了其中一个 Controller 作为备份

却忘记修改  @RequestMapping("/xxx")

在springmvc中不能同时映射一个名字(@RequestMapping("/xxx")

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

时间: 2024-08-10 15:11:00

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'XXXXX' bean的相关文章

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

Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘myCockpitMgrController’ bean method 报错为:Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘myCockpitMgrController’ bean method 是因为两个请求,请求到同

Ambiguous mapping found. Cannot map 'xxxxController' bean method

1.背景 今天要做一个demo,从github上clone一个springmvc mybatis的工程(https://github.com/komamitsu/Spring-MVC-sample-using-iBatis) 打包成war后启动报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.

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 'comp

异常:java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/app/userInfoMaint/getProvince.do'

调试代码时出现异常:java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/app/userInfoMaint/getProvince.do':当时就郁闷了,好像之前没怎么见过,后来发现原来是后台有两个"app/userInfoMaint/getProvince.do",并且它们路径相同. 解决方法很简单,相信大家都知道,就是将后台两个方法请求路径名区分开. 由上可知,锁定问题是

java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8888/contactTime/3308X7TqA976r857': {public com.infohold.hm.utils.Result

java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8888/contactTime/3308X7TqA976r857': {public com.infohold.hm.utils.Result com.infohold.hm.controller.EmployersIntentController.orderContactTime(java.lang

java.lang.IllegalStateException: No typehandler found for mapping XXX

前言:今天遇到了这个问题,刚开始觉得很容易解决的,毕竟能定位到出问题的文件和对应的字段,根据以往的经验也可以判断出是字段映射类型不匹配的问题,后来找了半天还是没找到问题的根源,从网上百度,也没看到令人满意的分析以及和我情况类似的描述.于是,下定决心,先深呼吸,然后冷静下来好好玩一下. 如下是我的分析过程,这里以提供分析的思路为主,希望以后在遇到类似的问题能一下子定位到,解决掉. 1:异常信息的一部分,如下所示,和以往一样,先仔细瞧瞧,根据异常的提示基本能定位到问题出在那个文件,那个字段或者某个小

java.lang.IllegalStateException: ContainerBase.addChild: start

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina] Tomcat部署Servlet时出错 caused by: Caused by: java.lang.IllegalArgumentException: Invalid <url-patt

java.lang.IllegalStateException: Expected a string but was BEGIN_ARRAY at line 1 column 296

先贴代码 public class ListDataRequest extends JsonRequest<ArrayList<Note>> { public ListDataRequest(int method, String url,Map<String,String> contentBody, Listener<ArrayList<Note>> listener, ErrorListener errorlistener) {  super(

Tomcat部署项目时出错java.lang.IllegalStateException: ContainerBase.addChild: start:org.apache.catalina.Life

Tomcat部署项目时出错java.lang.IllegalStateException: ContainerBase.addChild: start:org.apache.catalina.LifecycleException: Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/项目名]] 一个很简单的项目,没有出现编译错误,从Eclipse中用Tomcat v