文件上传

来源:互联网 发布:平淡日子里的刺 知乎 编辑:程序博客网 时间:2024/06/05 10:53

关键的一些代码

//获取存取路径        String serverPath=ServletActionContext.getServletContext().                        getRealPath("/upload/book")+"\\"+uploadFileFileName;        File file=new File(serverPath);        FileUtils.copyFile(uploadFile, file);
原创粉丝点击