一)服务端附件上传代码
package com.oysept.attachment.controller;
import java.io.IOException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
/**
* 附件上传controller
* @author ouyangjun
*/
@Controller
@RequestMapping(value = "/attachment")
public class UploadController {
/**
* 服务器附件上传接口
* @param files
* @param fileName
* @return
* 请求地址: http://localhost:8080/attachment/upload/fileUpload
*/
@RequestMapping(value = "/upload/fileUpload", method = RequestMethod.POST)
@ResponseBody
public String fileUpload(@Reques