引入依赖
commons-io commons-io 2.11.0
code 拷贝文件夹
@PostMapping("/findB00List") @CrossOrigin public Result findB00List(String b00) throws SQLException, IOException {// 拷贝文件夹File file1 = new File("E:\\test01");File file2 = new File("E:\\test02");FileUtils.copyDirectoryToDirectory(file1,file2);// 拷贝文件/*File file3 = new File("day13\\aaa\\hbCopy1.jpg");File file4 = new File("day13\\fff");FileUtils.copyFileToDirectory(file3,file4);*/ListB00List= dictService.findB00List(b00);return Result.ok(B00List); }
code 拷贝文件