!184 一键改包增加新项目目录检测,若新目录存在则退出程序。

Merge pull request !184 from muyi/master
This commit is contained in:
芋道源码 2022-05-28 01:24:58 +00:00 committed by Gitee
commit add9317d89
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 6 additions and 2 deletions

View File

@ -48,8 +48,12 @@ public class ProjectReactor {
String packageNameNew = "cn.start.pp"; String packageNameNew = "cn.start.pp";
String titleNew = "土豆管理系统"; String titleNew = "土豆管理系统";
String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后项目所在的目录 String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后项目所在的目录
log.info("[main][新项目路径地址 ({})]", projectBaseDirNew); log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew);
if (FileUtil.exist(projectBaseDirNew)) {
log.info("[main][新项目目录检测 ({})已存在,请更改新的目录,程序退出]", projectBaseDirNew);
return;
}
log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew);
// 获得需要复制的文件 // 获得需要复制的文件
log.info("[main][开始获得需要重写的文件,预计需要 10-20 秒]"); log.info("[main][开始获得需要重写的文件,预计需要 10-20 秒]");
Collection<File> files = listFiles(projectBaseDir); Collection<File> files = listFiles(projectBaseDir);