Jfinal根据url下载文件

贺景铄
2023-12-01
String path = (PathKit.getWebRootPath()+"/exclemodel/").replace("\\", "/");
	            URL httpurl = new URL("***");  
	            String fileName = "*.xlsx";  
	            File f = new File(path + fileName);  
	            FileUtils.copyURLToFile(httpurl, f);  
	            if(f.isFile()){
	            	renderFile(f);
	            }
其中,FileUtils类引自
org. apache. commons. io.FileUtils
 类似资料: