스프링 @RequestMapping

1 개요[ | ]

스프링 @RequestMapping
@RequestMapping("/")
public String home() {
	 return "Hello bootweb!";
}
@RequestMapping(path = { "/greet", "/hello" })
public String greet() {
	 return "안녕하세요";
}
@RequestMapping(value = "/hello/world", method = RequestMethod.GET)
@ResponseBody
public String helloWorld() {
    return "Hello, world!";
}
@RequestMapping("/greet/{name}")
public String greet(@PathVariable("name") String name) {
	return "안녕하세요? " + name + "님 반갑습니다.^^";
}
@RequestMapping(method=RequestMethod.GET, value={"/movies","/movies/{id}"})
public String getMovieDetails(Model model,
     @RequestParam(value="id", required=false) Long id,
     @PathVariable("id") Long id2)
{
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}