Skip to content

Instantly share code, notes, and snippets.

@eagleon
Created February 22, 2016 06:27
Show Gist options
  • Save eagleon/4e573cef479126ef5743 to your computer and use it in GitHub Desktop.
Save eagleon/4e573cef479126ef5743 to your computer and use it in GitHub Desktop.
spring mvc支持 put, delete 提交方法

http://blog.csdn.net/mr__fang/article/details/9086201

<filter>
    <filter-name>HiddenHttpMethodFilter</filter-name>
    <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>HiddenHttpMethodFilter</filter-name>
    <servlet-name>dbproxymanage</servlet-name>
</filter-mapping>
这里不要变动。

在form内部加上一hidden域

就可以了。

浏览器本身只支持get和post方法,使用_method来告知spring这是一个put请求。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment