본문 바로가기

Web/Spring

[Spring](Error) Ambiguous mapping found. Cannot map '' bean method

org.springframework.beans.factory.BeanCreationException: 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 'mobileController' bean method 

public java.lang.String co.kr.test.mobile.controller.MobileController.checkinMobile(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.util.Map<java.lang.String, java.lang.String>,org.springframework.ui.ModelMap) throws java.lang.Exception

to {[/mobile/checkinMobile.mmr],methods=[GET || POST],params=[],headers=[],consumes=[],produces=[],custom=[]}: There is already 'mobileOfficeController' bean method





MobileController 와 MobileOfficeController 에서 동일한 값으로 맵핑이 되어서 발생함

(@RequestMapping) 에 동일한 값이 없는지 확인 후 동일한 값이 없도록 한다.


'Web > Spring' 카테고리의 다른 글

[Spring] Controller에서 alert 발생 후 redirect 하는 방법  (0) 2021.07.23