关于SpringBoot 启动失败 Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. 的问题解析
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. 的问题解析的更多相关文章
- 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 ...
- 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' ...
- springboot启动报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError
最近在用springboot构建项目,控制台报错:Handler dispatch failed; nested exception is java.lang.AbstractMethodError, ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 项目启动时报错Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
https://www.cnblogs.com/liuyp-ken/p/7911536.html 解决过程: 1.检查配置,反反复复看了很多遍,确认没有问题. 2. 网上找了很多资料,类似的问题很多, ...
- 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 ...
随机推荐
- CentOS7学习笔记(四) 系统运行级别
什么是运行级别 在CentOS系统中包含七种运行级别,例如命令行或图形化界面就是最常用的运行级别 运行级别的两种表示方式及作用 运行级别 运行级别 作用说明 0 poweroff.target 关机 ...
- CLR via C# 笔记 -- 数组(16)
1. 数组隐式继承 System.Array,所以数组是引用类型.变量包含的是对数组的引用,而不是包含数据本身的元素. 2. 数组协变性.将数组从一种类型转换为另一种类型. string[] sa = ...
- FEDORA34 安装CUDA11.3
FEDORA34 安装CUDA11.3 首先确保能装上最新的显卡驱动. FEDORA显卡驱动安装 然后去官网下fedora对应的.run安装文件.运行安装, 但不要选装驱动. 完成后加环境变量: # ...
- QT学习:10 IO类
--- title: framework-cpp-qt-10-IO类 EntryName: framework-cpp-qt-10-QIODevice date: 2020-04-17 10:24:0 ...
- TI AM62x工业开发板规格书(单/双/四核ARM Cortex-A53 + 单核ARM Cortex-M4F,主频1.4GHz)
1 评估板简介 创龙科技TL62x-EVM是一款基于TI Sitara系列AM62x单/双/四核ARM Cortex-A53 + 单核ARM Cortex-M4F多核处理器设计的高性能低功耗工业评估板 ...
- Windows在待机后重新进入桌面出现资源管理器无响应的解决方案
问题 在日常使用Windows操作系统的过程中,我们可能会遇到一种较为特殊的情况--在系统待机后重新激活桌面时,资源管理器出现无响应现象.这一问题不仅影响用户体验,还可能导致剪切板功能异常,进而影响到 ...
- EXPLAIN sql优化方法
select A . id , A . title , B . title from jos_content A left join jos_categories B on A . catid = ...
- 统计里面PV 和 UV代表什么意思
1.网站流量bai统计中"PV"它所代表的意思是访问量了,具体指的du就是网站zhi的页面点击量或是浏览量,亦或是页面的刷新量dao了,网站的页面每刷新一次,就统计一个" ...
- Django model 层之Making Query总结
Django model 层之Making Query总结 by:授客 QQ:1033553122 实践环境 Python版本:python-3.4.0.amd64 下载地址:https://www. ...
- Known框架实战演练——进销存基础数据
本文介绍如何实现进销存管理系统的基础数据模块,基础数据模块包括商品信息.供应商管理和客户管理3个菜单页面.供应商和客户字段相同,因此可共用一个页面组件类. 项目代码:JxcLite 开源地址: htt ...