小白的报错日常

Ambiguous mapping

Ambiguous mapping. Cannot map 'customerController' method
public com.cdmtc.model.CommonResult com.cdmtc.controller.CustomerController.insert(com.cdmtc.model.Customer)
to {[/insert],methods=[POST]}: There is already 'baseInfoController' bean method
public org.springframework.http.ResponseEntity<com.cdmtc.model.modelui.ResponseResult> com.cdmtc.controller.BaseInfoController.insert(com.cdmtc.model.BaseInfo) mapped.

有道翻译如下:
模糊映射。无法映射“customerController”方法
公共com.cdmtc.model.CommonResult com.cdmtc.controller.CustomerController.insert (com.cdmtc.model.Customer)
对于{[/insert],methods=[POST]}:已经有了’baseInfoController’ bean方法
公共org.springframework.http.ResponseEntity < com.cdmtc.model.modelui。ResponseResult > com.cdmtc.controller.BaseInfoController.insert (com.cdmtc.model.BaseInfo)映射。

原因:
有value值重复的PostMapping
在controller 找的结果如下

@PostMapping(value = "/insert")public ResponseEntity<ResponseResult> insert(@RequestBody @ApiParam(name="基础数据对象", type="BaseInfo", value="传入json格式", required=true) BaseInfo baseInfo) @PostMapping(value = "/insert")
@ApiOperation(value = "插入数据")public CommonResult insert(@RequestBody Customer customer)

解决办法:
修改contoller 下 value 的值 ,让他们不一样就可以解决啦

Ambiguous mapping(模糊映射)相关推荐

  1. SpringBoot项目启动报错,java.lang.IllegalStateException: Ambiguous mapping.访问路径模棱两可,无法映射的问题!!!

    问题描述: SpringBoot项目刚启动就报错 下面是报错信息: 我这里提取了一下关键信息 Ambiguous mapping.(模棱两可的mapping) Cannot map 'test' me ...

  2. SpringMVC之Ambiguous mapping(模棱两可的映射)

    1.web.xml和核心配置文件的编辑见上篇http://blog.csdn.net/u010101142/article/details/55005330: 2.还是HelloController类 ...

  3. 映射报错怎么解决 Ambiguous mapping. Cannot map ‘basicPersonStreamDataController‘ method

    Ambiguous mapping. Cannot map 'basicPersonStreamDataController' method 出错首先检查 实现接口有没有@service注解 或者是C ...

  4. Ambiguous mapping found. Cannot map 'xxxxController' bean method

    1.背景 今天要做一个demo,从github上clone一个springmvc mybatis的工程(https://github.com/komamitsu/Spring-MVC-sample-u ...

  5. pringMVC“Ambiguous mapping found. Cannot map 'XXXController' bean method”解决方法

    [转 :http://www.fanfanyu.cn/news/staticpagefile/2351.html] 最近在开发项目的过程中SpringMVC抛了个"Ambiguous map ...

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

    问题:springmvc 启动时出现Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot 原因:控制层 ...

  7. 【Spring Cloud】EnableFeignClients后报错:Ambiguous mapping. Cannot map XXX method YYY

    这是在使用Feign优化Http调用时遇到的一个错误,启动时报错类似下方: Ambiguous mapping. Cannot map 'XXX' method YYY to {GET /file/x ...

  8. pringMVC“Ambiguous mapping found. Cannot map ‘XXXController‘ bean method”解决方法

    pringMVC"Ambiguous mapping found. Cannot map 'XXXController' bean method"解决方法 参考文章: (1)pri ...

  9. OpenGL parallax mapping视差映射的实例

    OpenGL parallax mapping视差映射 先上图,再解答. 完整主要的源代码 源代码剖析 先上图,再解答. 完整主要的源代码 #include <glad/glad.h> # ...

  10. 视差图转为深度图_Parallax Mapping视差映射:模拟冰块

    继续练习一个模拟冰块的效果,模拟的是一个不透明内部有杂质的冰块,内部杂质用视差映射来实现,表面就是简单的法线贴图+Cubemap反射采样,也可以直接只计算高光不反射图案.文章会把视差映射讲一下,算是对 ...

最新文章

  1. music算法_“要热爱 请深爱”系列(5)浅谈模拟退火算法
  2. NEUQ 2015: Bitmap(二维hash)
  3. 【集合之HashMap】HashMap实现原理及非线程安全原因
  4. webstorm前端调用后端接口_软件测试面试题:怎么去判断一个bug是前端问题还是后端问题...
  5. oracle数据库日期格式的运算,Oracle时间类型date,timestamp时间差计算
  6. LeetCode 360. 有序转化数组(抛物线对称轴)
  7. python创建文件夹用什么函数_Python——os.mkdir()在指定路径下创建文件夹 + 路径的连接理解...
  8. 计算机模块的概念,用户定义类模块概念-计算机二级-Access
  9. windbg学习---.browse打开一个新的command 窗口
  10. 【转】mysql createtable errno 121 150 错误 建表错误 外键
  11. FLINK提交任务的两种方式
  12. 波士顿大学 计算机专业,波士顿大学计算机科学专业波士顿大学计算机科学专业.pdf...
  13. 引用防删——JAVA设计模式总结之六大设计原则
  14. 爬虫学习笔记(十八)—— 点触验证码:超级鹰、12306自动登录
  15. webservice接口和http接口(API接口)的区别
  16. android hwcomposer
  17. Qt tableview
  18. 马自达CX-4升级英国·牧童Vaquero汽车音响
  19. 菜鸟的数学建模之路(六):层次分析法
  20. oracle 通过数据库主键外键级联删除

热门文章

  1. 字符编码集与ASCII码表
  2. 32位系统支持多大内存 Windows32位/64位系统最大支持内存详解
  3. 零基础小白必须学习的,3Dmax快捷键大全!你都会吗?
  4. 参加了feedsky的博客大赛
  5. oracle_home环境变量值,ORACLE_HOME环境变量配置阐明
  6. 【AI视野·今日NLP 自然语言处理论文速览 第六期】Fri, 11 Jun 2021
  7. UE4搭建场景与特效文档—地形、水体、植被、雨雾效果
  8. 对数学期望、方差、协方差、协方差矩阵的理解
  9. 如何实现网页视频聊天?
  10. mysql的升序和降序