SSM框架整合中遇到重復的問題Ambiguous handler methods mapped for HTTP


嚴重: Servlet.service() for servlet [spring] in context with path [/ssmDemo] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/init.do': {public java.lang.String com.controller.InvitationController.toPageInvList(java.lang.Integer,com.vo.Page,javax.servlet.http.HttpServletRequest), public java.lang.String com.controller.InvitationController.toPageInvList(javax.servlet.http.HttpServletRequest)}. 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!] with root cause
java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path '/init.do': {public java.lang.String com.controller.InvitationController.toPageInvList(java.lang.Integer,com.vo.Page,javax.servlet.http.HttpServletRequest), public java.lang.String com.controller.InvitationController.toPageInvList(javax.servlet.http.HttpServletRequest)}. 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!

原因在於,在xxxController中寫了兩個init.do方法,造成了模棱兩可的錯誤,刪除掉一個即可

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM