I have a controller\'s method with a PUT
method, which receives multipart/form-data:
@RequestMapping(value = \"/putIn\", method = RequestMeth
This is unfortunately currently not supported in Spring MVC Test, and I don't see a work-around other than creating your own custom MockPutMultipartHttpServletRequestBuilder
and copying-n-pasting code from the standard implementation.
For what it's worth, Spring MVC also does not support PUT
requests for file uploads by default either. The Multipart resolvers are hard coded to accept only POST
requests for file uploads -- both for Apache Commons and the standard Servlet API support.
If you would like Spring to support PUT
requests in addition, feel free to open a ticket in Spring's JIRA issue tracker.