异常: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 '/app/userInfoMaint/getProvince.do'

原文地址:https://www.cnblogs.com/lidelin/p/9297936.html

时间: 2024-10-05 05:05:07

异常:java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/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

Ambiguous handler methods mapped for HTTP path

一.问题:映射重复导致的错误 java代码如下: @RequestMapping(value = "/info/{remove}/{id}", method = RequestMethod.GET) public String removeNewsById(@PathVariable("id") long id) { @RequestMapping(value = "/info/{fav}/{id}", method = RequestMetho

异常-User class threw exception: java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext.

1 详细信息 User class threw exception: java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext. This stopped SparkContext was created at: org.apache.spark.SparkContext.<init>(SparkContext.scala:76) com.wm.bigdata.spark.etl.RentOrd

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map &#39;XXXXX&#39; bean

今天启动srpingmvc项目的时候出现了这个异常, 原因: 在同个项目中,我复制了其中一个 Controller 作为备份 却忘记修改  @RequestMapping("/xxx") 在springmvc中不能同时映射一个名字(@RequestMapping("/xxx") 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 是因为两个请求,请求到同

android异常java.lang.IllegalStateException: getDatabase called recursively问题

问题场景: 在app首次启动使用到db的时候,后台提示如下错误信息 java.lang.IllegalStateException: getDatabase called recursively at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:204) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase

异常java.lang.IllegalStateException的解决

在初始化viewPagerAdapter时,显示异常.从网上找了找有两类这样的问题,一种是说给一个视图设置了两个父类,如: TextView tv = new TextView();layout.adView(tv);layout2.adView(tv);这样就会报异常,需要先在其父视图中释放才能添加到另一个父视图 第二种是说:初始化时使用inflater可能出现异常 View result = inflater.inflate(R.layout.customer_layout, contain

有时候在操作Session时,系统会抛出如下异常:java.lang.IllegalStateException: Cannot create a session after the response has been committed

有时候在操作Session时,系统会抛出如下异常 java.lang.IllegalStateException: Cannot create a session after the response has been committed 原因1: Session 的创建语句: HttpSession seesion = request.getSession(); 之前有Response的输出语句. 应该把HttpSession seesion = request.getSession(); 放

Tomcat上java.lang.IllegalStateException: Optional int parameter &#39;id&#39; is not present

今日, 本人在tomcat+spring mvc平台的服务器上遇到java.lang.IllegalStateException: Optional int parameter 'id' is not present异常, 很是怪异, mvc方法里面的id为int型, 明明是有值的, 为什么说没有? 改为Integer也不行, mvc方法直接无响应! 然后, 在本地模拟改用例, 发现可以正常执行, 而另一个同事说要把超长的图片参数放到Mvc方法的最后就可以正常访问! 怪异! 后来经过多次试验,