首页 > 代码库 > SpringMVC上传图片并压缩及剪切demo

SpringMVC上传图片并压缩及剪切demo



/**
 * 
 */
package com.up.controller;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Random;

import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import com.up.constant.SystemConstants;
import com.up.util.FileCopy;
import com.up.util.ImageUtils;
import com.up.util.OperateImage;
import com.up.util.UploadUtil;


/**
 * @author hu.shiguo
 * @time 2014-3-14下午2:53:15
 * @description
 * @version
 */
@Controller
@RequestMapping(value=http://www.mamicode.com/"upload")>

SpringMVC上传图片并压缩及剪切demo