Ambiguous mapping(模糊映射)
小白的报错日常
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(模糊映射)相关推荐
- SpringBoot项目启动报错,java.lang.IllegalStateException: Ambiguous mapping.访问路径模棱两可,无法映射的问题!!!
问题描述: SpringBoot项目刚启动就报错 下面是报错信息: 我这里提取了一下关键信息 Ambiguous mapping.(模棱两可的mapping) Cannot map 'test' me ...
- SpringMVC之Ambiguous mapping(模棱两可的映射)
1.web.xml和核心配置文件的编辑见上篇http://blog.csdn.net/u010101142/article/details/55005330: 2.还是HelloController类 ...
- 映射报错怎么解决 Ambiguous mapping. Cannot map ‘basicPersonStreamDataController‘ method
Ambiguous mapping. Cannot map 'basicPersonStreamDataController' method 出错首先检查 实现接口有没有@service注解 或者是C ...
- Ambiguous mapping found. Cannot map 'xxxxController' bean method
1.背景 今天要做一个demo,从github上clone一个springmvc mybatis的工程(https://github.com/komamitsu/Spring-MVC-sample-u ...
- pringMVC“Ambiguous mapping found. Cannot map 'XXXController' bean method”解决方法
[转 :http://www.fanfanyu.cn/news/staticpagefile/2351.html] 最近在开发项目的过程中SpringMVC抛了个"Ambiguous map ...
- java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ' ' bean method
问题:springmvc 启动时出现Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot 原因:控制层 ...
- 【Spring Cloud】EnableFeignClients后报错:Ambiguous mapping. Cannot map XXX method YYY
这是在使用Feign优化Http调用时遇到的一个错误,启动时报错类似下方: Ambiguous mapping. Cannot map 'XXX' method YYY to {GET /file/x ...
- pringMVC“Ambiguous mapping found. Cannot map ‘XXXController‘ bean method”解决方法
pringMVC"Ambiguous mapping found. Cannot map 'XXXController' bean method"解决方法 参考文章: (1)pri ...
- OpenGL parallax mapping视差映射的实例
OpenGL parallax mapping视差映射 先上图,再解答. 完整主要的源代码 源代码剖析 先上图,再解答. 完整主要的源代码 #include <glad/glad.h> # ...
- 视差图转为深度图_Parallax Mapping视差映射:模拟冰块
继续练习一个模拟冰块的效果,模拟的是一个不透明内部有杂质的冰块,内部杂质用视差映射来实现,表面就是简单的法线贴图+Cubemap反射采样,也可以直接只计算高光不反射图案.文章会把视差映射讲一下,算是对 ...
最新文章
- music算法_“要热爱 请深爱”系列(5)浅谈模拟退火算法
- NEUQ 2015: Bitmap(二维hash)
- 【集合之HashMap】HashMap实现原理及非线程安全原因
- webstorm前端调用后端接口_软件测试面试题:怎么去判断一个bug是前端问题还是后端问题...
- oracle数据库日期格式的运算,Oracle时间类型date,timestamp时间差计算
- LeetCode 360. 有序转化数组(抛物线对称轴)
- python创建文件夹用什么函数_Python——os.mkdir()在指定路径下创建文件夹 + 路径的连接理解...
- 计算机模块的概念,用户定义类模块概念-计算机二级-Access
- windbg学习---.browse打开一个新的command 窗口
- 【转】mysql createtable errno 121 150 错误 建表错误 外键
- FLINK提交任务的两种方式
- 波士顿大学 计算机专业,波士顿大学计算机科学专业波士顿大学计算机科学专业.pdf...
- 引用防删——JAVA设计模式总结之六大设计原则
- 爬虫学习笔记(十八)—— 点触验证码:超级鹰、12306自动登录
- webservice接口和http接口(API接口)的区别
- android hwcomposer
- Qt tableview
- 马自达CX-4升级英国·牧童Vaquero汽车音响
- 菜鸟的数学建模之路(六):层次分析法
- oracle 通过数据库主键外键级联删除