跟着网上的视频敲示例代码,然后就报错了...
Web页面代码:
Controller代码:
@Controller
@RequestMapping("/test")
public class SpringRequestMapping
{
// 成员属性;
private final String SUCCESS = "success";
/**
* 功能描述:测试RESTful PUT;
* @param id
* @return
*/
@RequestMapping(value = "/restPut/{id}", method = RequestMethod.PUT)
public String restPut(@PathVariable("id") Integer id)
{
System.out.println("RESTful PUT:" + id);
return SUCCESS;
}
}
web.xml
HiddenHttpMethodFilter
org.springframework.web.filter.HiddenHttpMethodFilter
HiddenHttpMethodFilter
/*
新手求助,麻烦大神指点一二,问题出在哪了???
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你的form的提交方式是post,但是配置映射时置为RequestMethod.PUT。你看看是不是这个问题。