    @ResponseBody
    @RequestMapping(value = "AddUserIcon",method = RequestMethod.POST,produces = "text/plain;charset=UTF-8")
    public String addUserIcon(HttpServletRequest request){
        String userName=request.getParameter("userName");
        String s=request.getParameter("userIconContent");
        //获取服务器存放图片的路径
        String path=request.getSession().getServletContext().getRealPath("/img/user_icon");
        //生成图片的随
        // 机数
        Date date=new Date();
        DateFormat dateFormat=new SimpleDateFormat("yyyyMMddHHmmss");
        String time=dateFormat.format(date);

        //图片文件的名称
        String fileName="/"+userName.trim()+time.trim()+".png";