关于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 ...
随机推荐
- java rabbitmq模拟生产者,消费者demo
1.exchange类型,rabbitmq交换机类型 exchange类型fanout 扇形交换机,它会把所有发送到该交换机的消息路由到所有与该交换机绑定的队列中.direct 直连交换机,它会把消息 ...
- 实验12.dhcp服务器实验
实验12.dhcp服务器实验 测试DHCP服务的可用性 实验组 交换机配置 R1 interface GigabitEthernet0/0/0 ip address 192.168.1.1 255.2 ...
- CF1523D Love-Hate
抽象化题意: 一共有 \(m\) 个元素,给定 \(n\) 个集合,每个集合的元素不超过 \(15\) 个,求出一个元素个数最多的集合 \(S\) 是至少 \(\lceil \dfrac{n}{2} ...
- nginx 反向代理(proxy)与负载均衡(upstream)应用实践
集群介绍 集群就是指一组(若干个)相互独立的计算机,利用高速通信网络组成的一个较大的计算机服务系统,每个集群节点(即集群中的每台计算机)都是运行各自服务的独立服务器.这些服务器之间可以彼此通信,协同向 ...
- Kafka Stream 以及其他流处理框架对比
1. Kafka Stream Introduction 假设我们需要对kafka 消息做流数据分析,例如: 对部分消息做过滤 每分钟计算一次收到了多少消息 这种情况下,对于消息过滤以及定时统计,甚至 ...
- Linux内核:通知链 机制
Linux内核:通知链 机制 背景 在驱动分析中经常看到fb_notifier_callback,现在趁有空学习一下. 参考: https://www.cnblogs.com/armlinux/arc ...
- Top cluster 树分块
写点基础的东西.随便写的,勿喷. top cluster 一个 cluster 是一个联通子图,且至多有两个点与其他部分连接 这两个点被称为 boundary node 其余点被称为 internal ...
- 拟合算法与matlab工具包实现
与插值问题不同,在拟合问题中不需要曲线一定经过给定的点.拟合问题的目标是寻求一个函数(曲线),使得该曲线在某种准则下与所有的数据点最为接近,即曲线拟合的最好(最小化损失函数) 目录 一.插值和拟合的区 ...
- 松灵机器人scout mini小车 自主导航(2)——仿真指南
松灵机器人Scout mini小车仿真指南 之前介绍了如何通过CAN TO USB串口实现用键盘控制小车移动.但是一直用小车测试缺乏安全性.而松灵官方贴心的为我们准备了gazebo仿真环境,提供了完整 ...
- python配置国内pypi镜像源操作步骤
使用pip config命令设置默认镜像源,使用国内的源,提高安装速度 操作步骤 临时方式pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/si ...