컨텍스트 경로

DispatcherServlet

 매핑 URL패턴 

실제 URL 

 /chap07

http://host:port/chap07/event/list 

 /chap07 

/main/*

http://host:port/chap07/main/event/list 


value를 이용해서 경로를 지정할 수 있다.

@RequestMapping(value = "/event/create", method = RequestMethod.GET)

public String home(Locale locale, Model model) {

}


여러 경로를 한 메서드에서 처리하고 싶다면 배열로 경록 목록을 지정 할 수 있다.

@RequestMapping({"/main","/index"})

public String home(Locale locale, Model model) {

}

블로그 이미지

왕왕왕왕

,