티스토리 뷰

반응형

[error]

java.lang.IllegalStateException: Ambiguous mapping found. Cannot map '***'Controller bean method

there is already '***'Controller bean method

 

@Controller
public class Controller {
@RequestMapping(value = "/main.action", method = { RequestMethod.GET })
public Object main(){
return null;
}
@RequestMapping(value = "/main.action", method = { RequestMethod.POST })
public Object list() {
return null;
}
}
Written by JooPyo-Hong ❤️

 

Controller의 @RequestMapping(value = "") 에 동일한 값인지 확인한다.

위에서는 "/main.action" 두 개여서 오류가 났다.

 

다른 Controller 에 있어도 동일한 값("/main.action")이면 오류난다.

반응형
댓글
반응형