There is already 'xxxxx' bean method
来源:互联网 发布:xcode windows能用吗 编辑:程序博客网 时间:2024/06/07 19:58
今天写代码的时候遇到了如下问题
2017-04-26 11:17:02.198 WARN 6411 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'demoController' method public void cn.peakline.controller.DemoController.checkCode(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.String) throws java.io.IOExceptionto {[/demo/checkCode]}: There is already 'demoController' bean methodpublic void cn.peakline.controller.DemoController.getCode(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) mapped.
经过检查,是因为controller里有了多个相同的请求{[/demo/checkCode]}
,修改或者删除其他方法,确定只有一个请求名称即可
0 0
- There is already 'xxxxx' bean method
- There is already '******' bean method
- There is already 'baseController' bean method spring方法重定义
- persistence.unit:unitName=# xxxxx is already installed.
- No qualifying bean of type xxxxx is defined
- There is already an open DataReader associated ……
- There is a process already using the admin port 4848
- There is already a statement named search in this SqlMap.
- There is a chart instance already initialized on the dom
- Mybatis-异常-There is no getter for property named 'VARCHAR' in 'class com.xxx.xxxxx
- iOS xcode "XXXXX.h couldn't be opened because there is no such file"
- FragmentManager is already executing transactions after using method setOffscreenPageLimit()
- There is no Action mapped for namespace [/] and action name [xxxxx] associated with context的错误原因
- Execute a Method When a Bean Is Created
- Executing a Method When a Bean Is Destroyed
- Duplicate spring bean id “XXXXX”
- There is already an open DataReader associated with this Connection which must be closed first
- LINQ: There is already an open DataReader associated with this Command which must be closed first
- git使用详细介绍
- Context
- ADB原理,Wi-Fi连接,常用命令及拓展
- 亚马逊的策略分析:不仅仅是电商,AI构建新的业务支柱
- MVC 4中使用ServiceStack.Redis实现Redis队列【错误日志并发处理】
- There is already 'xxxxx' bean method
- Unity3d 实现MeshRender 材质球的遮罩
- 如何提高编程水平,老程序员的几个建议你是否认同
- mac_install_mysql57
- 山科校赛 Problem G: 数字逻辑练习题(进制)
- ubantu任务栏不见,终端打不开解决
- 【Web渲染性能优化】渲染管道
- 用注册表解决Keil4与Keil5在同系统不能共存
- Opengl基本知识点(面试用)持续更新。。。