Spring MVC的@RequestMapping注解类的params参数用法示例

例子如下:

1、前端请求(extjs3的写法):

Ext.Ajax.request({
url: 'changeResidenceServlet?action=zhifa', 
method: 'POST',
params: {
pk_id: _pk_id,
ZFDDYJ:sfsshyj
} ,
callback: function (options, success, originalRequest) {
if(success){

。。。。


2、java后端接收请求:


@Controller
@RequestMapping("/changeResidenceServlet") 
public class ChangeResidenceServlet extends SuperServlet implements ProcessServlet {


。。。。。。

@RequestMapping(params = "action=zhifa")
public void zhifa(HttpServletRequest request,HttpServletResponse response,ChangeResidenceSFVO vo) throws IOException, ServletException{
RequestResult rs = new RequestResult();

。。。。。。







你可能感兴趣的:(SpringMVC,ExtJS,Spring)