[Spring MVC]@RequestMappingのmethod、value属性のサンプル

1.method属性
POSTでリクエストを処理
@RequestMapping(path = “/userEdit", method = RequestMethod.POST)

GETでリクエストを処理
@RequestMapping(path = “/userEdit", method = RequestMethod.GET)

2.value属性
使用例1
@RequestMapping(value = “/userEdit")
public String method() {
return “index";
}
使用例2
@RequestMapping(value = { “/", “/top" })

SpringMVC

Posted by arkgame