Allen_Zsj

导航

StringMVC @RequestMapping method属性

@RequestMapping(value="/testMethod",method=RequestMethod.POST)
public String testMethod(){
System.out.println("testMethod");
return SUCCESS;
}

访问需要指定方法:

<form action="springmvc/testMethod" method="post">
<input type="submit" value="submit">
</form>

posted on 2017-12-19 15:08  Allen_Zsj  阅读(171)  评论(0编辑  收藏  举报