Application run failed
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:
Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'toCCustomerController' method

  出现此情况的 ,仔细观察当前controller 中的 requestMapping 中 是否存在相同url ,比如说不同方法名的请求路径相同

eg:

@PostMapping("/woxihuandabaitui")
public Object A(){ return ""; }

@PostMapping("/woxihuandabaitui")
public Object B(){ return ""; }

  

woxihuandabaitui 就是原因,Spring不允许映射中存在摸棱两可的requestMapping。改个名就好了,实际中也不可能存在一个类中俩一样的requestMapping,

如果有,那就是你new  bee

关于SpringBoot 启动失败 Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. 的问题解析的更多相关文章

  1. MyBatis与Spring MVC结合时,使用DAO注入出现:Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required

    错误源自使用了这个例子:http://www.yihaomen.com/article/java/336.htm,如果运行时会出现如下错误: Invocation of init method fai ...

  2. Invocation of init method failed; nested exception is java.text.ParseException: '?' can only be specfied for Day-of-Month or Day-of-Week.

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cronTrigger' ...

  3. springboot启动报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError

    最近在用springboot构建项目,控制台报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError, ...

  4. Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  5. MyBatis笔记----报错:Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/ij34/mybatis/applicationContext.xml]: Invocation of init method failed; nested exception is org.sp

    四月 05, 2017 4:51:02 下午 org.springframework.context.support.ClassPathXmlApplicationContext prepareRef ...

  6. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t

    spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...

  7. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [bean.xml]: Invocation of init method failed; nested exception is

    在复制xml文件进行修改的时候,我经常将不小心对原文件进行修改,而导致创建bean出错.报错如下所示: Exception sending context initialized event to l ...

  8. spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

    spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web serv ...

  9. 项目启动时报错Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

    https://www.cnblogs.com/liuyp-ken/p/7911536.html 解决过程: 1.检查配置,反反复复看了很多遍,确认没有问题. 2. 网上找了很多资料,类似的问题很多, ...

  10. SpringBoot整合Elasticsearch启动报错处理 nested exception is java.lang.IllegalStateException: availableProcessors is already set to [8], rejecting [8]

    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean wit ...

随机推荐

  1. Linux设备模型:6、Bus

    作者:wowo 发布于:2014-4-15 19:21 分类:统一设备模型 原创文章,转发请注明出处.蜗窝科技,www.wowotech.net. 概述 在Linux设备模型中,Bus(总线)是一类特 ...

  2. Centos7或Ubuntu 磁盘扩容

    准备 切换到root用户(获取root权限) 安装: [root]# install lvm2 -y 查看当前信息: # 查看根分区大小 $ df -h Filesystem Size Used Av ...

  3. C#/.NET/.NET Core优秀项目和框架2024年6月简报

    前言 公众号每月定期推广和分享的C#/.NET/.NET Core优秀项目和框架(每周至少会推荐两个优秀的项目和框架当然节假日除外),公众号推文中有项目和框架的介绍.功能特点.使用方式以及部分功能截图 ...

  4. 嵌入式知识分享——GDB程序调试方法说明

    前  言 本指导文档适用开发环境: Windows开发环境:Windows 7 64bit.Windows 10 64bit Linux开发环境:Ubuntu 18.04.4 64bit 虚拟机:VM ...

  5. 复习 - ajax

    复习呢有一个很直观的感受,就是以前学的东西,萌懂半懂的,这一来全部都清楚了,你以前以为你学的并不好但是复习一次把以前的案例一做,居然能够自己独立完成,知识点看着掌握的还不错. 1. 两天时间就把整个a ...

  6. 用const修饰指针

    1)常量指针 语法:const 数据类型 *变量名; 不能通过解引用的方法修改内存地址中的值(用原始的变量名是可以修改的). 注意: l 指向的变量(对象)可以改变(之前是指向变量a的,后来可以改为指 ...

  7. 在linux系统中,对标准输出(stdout,文件描述符为 1)和标准错误(stderr,文件描述符为 2)重定向到文件

    请参考:2>/dev/null和>/dev/null 2>&1和2>&1>/dev/null的区别 下面的是本人浅尝辄止了,并非全貌,还是上面的文章说的比 ...

  8. vscode配置项

    因为vscode的默认配置,导致现在用的不是很舒服.总结了以下配置能让你的vscode用着更舒服. 1: 问题: 输入log按tab快速生成代码后,提示居然没了? 解决方案: "editor ...

  9. [oeasy]python0136_接收输入_input函数_字符串_str

    输入变量 回忆上次内容 上次研究了 一行赋值多个变量 a = b = 5 a, b = 7, 8   还研究了 标识符的惯用法 python使用的是 snake_case蛇形命名法 用下划线 分隔开小 ...

  10. oeasy 教您玩转 linux 010400 总结 summary

    ###### 上一部分我们都讲了什么?*   各种gui*   qt和gdk两个开源工具跨平台开发库*   发行版和gui之间的关系###### 我们一起来回顾一下整个学习过程*   我们从零开始*  ...