我用的spring中的ClassPathResource 对象获取的,但是在liunx中是没有任何效果的,求解?
@At("/downloadCadZip")
public void downloadCadZip(HttpServletRequest req , HttpServletResponse rep) throws IOException{
String url = "cad" + File.separator + "Debug.zip";//resouce下的文件: cad/Debug.zip
String file_name = "cad.zip"; //新的文件名称
ClassPathResource resource = new ClassPathResource(url);
DownloadFileUtil.downLoadFile(resource.getFile(), file_name, req, rep);
}