parent
2c49305854
commit
d7f56c6a49
@ -1,43 +0,0 @@
|
||||
package xyz.wbsite.dbtool.javafx.manger.callable;
|
||||
|
||||
import xyz.wbsite.dbtool.javafx.manger.FreeMarkerManager;
|
||||
import xyz.wbsite.dbtool.javafx.manger.ManagerFactory;
|
||||
import xyz.wbsite.dbtool.javafx.po.SBMDBOption;
|
||||
import xyz.wbsite.dbtool.javafx.tool.Tool;
|
||||
import xyz.wbsite.dbtool.web.frame.utils.ZipUtil;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.File;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
public class SBMDBCallable implements Callable {
|
||||
|
||||
private String path;
|
||||
private SBMDBOption option;
|
||||
|
||||
private FreeMarkerManager freeMarkerManager;
|
||||
|
||||
public SBMDBCallable(@NotNull String path, SBMDBOption option) {
|
||||
this.path = path;
|
||||
this.option = option;
|
||||
this.freeMarkerManager = ManagerFactory.getFreeMarkerManager();
|
||||
}
|
||||
|
||||
public Boolean call() throws Exception {
|
||||
// 文件输出文件
|
||||
File zipFile = new File(path, "SpringBootMDB.zip");
|
||||
// 文件输出目录
|
||||
File dir = new File(path, "SpringBootMDB");
|
||||
// 清空输出目录
|
||||
Tool.clear(dir);
|
||||
System.out.println("清空文件" + dir.getAbsolutePath());
|
||||
// 输出文件
|
||||
Tool.outputResource("SpringBootMDB/SpringBootMDB.zip", zipFile);
|
||||
// 解压文件
|
||||
new ZipUtil().unZip(zipFile, new File(path));
|
||||
// 删除文件
|
||||
zipFile.delete();
|
||||
System.out.println("删除文件" + zipFile.getAbsolutePath());
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
package xyz.wbsite.dbtool.javafx.po;
|
||||
|
||||
public class SBMDBOption {
|
||||
}
|
Binary file not shown.
Loading…
Reference in new issue