2010-04-22 66 views

回答

2

在Java Spring中,你可以使用RequestMapping註解來隔離不同類型的請求方法。這是在下面的鏈接部分13.11.3: http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-annotation

從本質上講,你可以使用這些註解來獲取HTTP請求的方法類型:

@RequestMapping(method = RequestMethod.GET) 
@RequestMapping(method = RequestMethod.POST) 
@RequestMapping(method = RequestMethod.PUT) 

所有請求類型是在RequestMethod枚舉object: http://apollo89.com/java/spring-framework-2.5.3/api/org/springframework/web/bind/annotation/RequestMethod.html

相關問題