采用的@Controller, 请求PUT和DELETE抛掷异常,PUT请求代码以下:java
@RequestMapping(value="/testREST/{id}", method=RequestMethod.PUT) public String testRESTPut(@PathVariable Integer id){ System.out.println("test REST PUT: "+ id); return SUCCESS; }
如上能够请求,正常调用方法处理,返回success对应的JSP,状态异常:app
type Status report.net
message JSPs only permit GET POST or HEADcode
description The specified HTTP method is not allowed for the requested resource.ip
若是把请求变成@ResponseBody则正常。ci
REST风格返回必定是@ResponseBody,不能返回页面吗?get