|  | @ -7,6 +7,7 @@ import com.yihu.wlyy.web.BaseController;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.json.JSONObject;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.http.MediaType;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.*;
 | 
	
	
		
			
				|  | @ -33,10 +34,23 @@ public class FileTestController extends BaseController {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             ObjectNode result = fastDFSUtil.upload(file.getInputStream(), "png", "测试");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             return write(200,"上传成功","data",result.toString());
 | 
	
		
			
				|  |  |         }catch (Exception e){
 | 
	
		
			
				|  |  |             return write(200, "上传成功", "data", result.toString());
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
		
			
				|  |  |             e.printStackTrace();
 | 
	
		
			
				|  |  |             return error(-1,"上传失败");
 | 
	
		
			
				|  |  |             return error(-1, "上传失败");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @ApiOperation(value = "test")
 | 
	
		
			
				|  |  |     @RequestMapping(value = "/test", method = RequestMethod.GET)
 | 
	
		
			
				|  |  |     public String test() {
 | 
	
		
			
				|  |  |         try {
 | 
	
		
			
				|  |  |             String j = null;
 | 
	
		
			
				|  |  |             //JSONObject json = new JSONObject(j);
 | 
	
		
			
				|  |  |             JSONObject json2 = new JSONObject("");
 | 
	
		
			
				|  |  |             return "a";
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
		
			
				|  |  |             return error(-1, e.getMessage());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |