@RequestMapping("/mvcupload")
private String mvcupload(HttpServletRequest request, MultipartFile file) throws IOException {
String filepath="http://localhost:8080/";
Client client = Client.create();
WebResource resource = client.resource(filepath + file.getOriginalFilename());
resource.put(file.getBytes());
return "hello";
}
tomcat服务器需要配置web.xml
<init-param>
<param-name>readonly</param-name>
<param-value>false</param-value>
</init-param>