Ambiguous mapping found. Cannot map 'competeController' bean method

报错:

Error creating bean with name ‘org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0‘: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘competeController‘ bean method

使用SpringMVC时遇到的错误,原因是自己太不仔细了,视图层向控制层传递数据时,在控制层中不同的两个方法上面写了相同的映射路径,

也就是@RequestMapping("")中引号中的值出现了相同,导致了上面的错误!原谅我的粗心大意!

Ambiguous mapping found. Cannot map 'competeController' bean method

原文地址:https://www.cnblogs.com/caizhen/p/9170350.html

时间: 2024-11-04 23:52:24

Ambiguous mapping found. Cannot map 'competeController' bean method的相关文章

Ambiguous mapping found. Cannot map 'xxxxController' bean method

1.背景 今天要做一个demo,从github上clone一个springmvc mybatis的工程(https://github.com/komamitsu/Spring-MVC-sample-using-iBatis) 打包成war后启动报错: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'XXXXX' bean

今天启动srpingmvc项目的时候出现了这个异常, 原因: 在同个项目中,我复制了其中一个 Controller 作为备份 却忘记修改  @RequestMapping("/xxx") 在springmvc中不能同时映射一个名字(@RequestMapping("/xxx") java.lang.IllegalStateException: Ambiguous mapping found. Cannot map 'XXXXX' bean

Spring异常Ambiguous mapping found.

SpringMVC启动时不停重复加载bean 通过浏览器访问获取异常:Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous

Caused by: java.lang.IllegalStateException: Ambiguous mapping found

Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘myCockpitMgrController’ bean method 报错为:Caused by: java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘myCockpitMgrController’ bean method 是因为两个请求,请求到同

java Map与Bean相互转化

import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap;

Map和Bean的相互转换

BeanUtils位于org.apache.commons.beanutils.BeanUtils下面,其方法populate的作用解释如下: 完整方法: BeanUtils.populate( Object bean, Map properties ), 这个方法会遍历map<key, value>中的key,如果bean中有这个属性,就把这个key对应的value值赋给bean的属性. 1.bean 转换成 map Person person1=new Person(); person1.

Java Map和Bean之前的转换

// Map --> Bean 2: 利用org.apache.commons.beanutils 工具类实现 Map --> Bean       public static void transMap2Bean2(Map<String, Object> map, Object obj) {           if (map == null || obj == null) {               return;           }           try {  

Ambiguous mapping found

If you have a single default method (without explicit path mapping), then all requests without a more specific mapped method found will be dispatched to it. If you have multiple such default methods, then the method name will be taken into account fo

Map转Bean小工具

public static <T> T converter(Map<String, Object> map, Class<T> clz) { T obj = null; try { obj = clz.newInstance(); BeanInfo beanInfo = Introspector.getBeanInfo(clz); PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescrip