Ambiguous handler methods mapped for HTTP path
来源:互联网 发布:安卓一键锁屏软件大全 编辑:程序博客网 时间:2024/06/09 21:39
映射重复导致的错误java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/getPrams': {public java.lang.String cn.ps.spring.controller.MainController.getJson(), public org.springframework.web.servlet.ModelAndView cn.ps.spring.controller.MainController.getPrams()}. If you intend to handle the same path in multiple methods, then factor them out into a dedicated handler class with that path mapped at the type level!at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodResolver.resolveHandlerMethod(AnnotationMethodHandlerAdapter.java:600)
代码:
@RequestMapping("/getPrams")public ModelAndView getPrams(){ModelAndView mav = new ModelAndView();mav.addObject("yejin", "woshiyejin");return mav;}@RequestMapping("/getPrams")@ResponseBodypublic String getJson(){return "a";}
@RequestMapping("/getPrams")<pre name="code" class="html">@RequestMapping("/getPrams")出现了两个名称一样的映射
1 0
- Ambiguous handler methods mapped for HTTP path
- Ambiguous handler methods mapped for HTTP path
- Ambiguous handler methods mapped for HTTP path
- Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/runyu/a/res/resource': {public
- SpringMVC 报错java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path
- Using HTTP Methods for RESTful Services
- is ambiguous in Mapped Statements collection
- HTTP Methods
- Http methods
- HTTP - Methods
- HTTP Status 500 No adapter for handler
- There is no Action mapped for namespace [/] and action name [hello] associated with context path [/
- There is no Action mapped for namespace [] and action name [] associated with context path []
- There is no Action mapped for namespace [/] and action name [upload/] associated with context path
- There is no Action mapped for namespace [/] and action name [Login] associated with context path [/e
- There is no Action mapped for namespace [/] and action name [] associated with context path [/struts
- There is no Action mapped for namespace [/] and action name [login] associated with context path [/M
- There is no Action mapped for namespace [/] and action name [] associated with context path [/dxm__s
- 私人云与圈子
- Linux中tty框架与uart框架之间的关系
- Visual C++ 2013 MSXML使用示例
- java中子类继承自父类的权限问题
- Oracle笔记 十一、PL/SQL函数和触发器
- Ambiguous handler methods mapped for HTTP path
- Oracle笔记 十二、PL/SQL 面向对象oop编程
- Oracle笔记 十三、PL/SQL面向对象之package
- 编程珠玑第八章——分治算法求解数组中的最大的连续和
- Oracle笔记 十四、查询XML操作、操作系统文件
- LeetCode Set Matrix Zeroes
- 一、Emacs基本操作(1)
- dynamic_cast & static_cast
- extern的使用