nested exception is java.lang.IllegalStateException: Ambiguous mapping. 嵌套的异常是java.lang.IllegalStateException:模棱两可的映射。
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 'selectContentController' method
public void com.usian.controller.SelectContentController.deleteContentByIds(long)
to { /content/insertTbContent}: There is already 'selectContentController' bean method
void com.usian.controller.SelectContentController.insertTbContent(com.usian.pojo.TbContent) mapped.
出现这个错误说明:映射路径重复了!
@RequestMapping("/selectContentCategoryByParentId")
public List
return contentCategoryService.selectContentCategoryByParentId(id);
}
@RequestMapping("/selectContentCategoryByParentId")
public Integer insertContentCategory(TbContentCategory tbContentCategory){
return contentCategoryService.insertContentCategory(tbContentCategory);
}
两个方法的映射路径重复了会发生这样的错误!

浙公网安备 33010602011771号