Use application home for runtime data paths

This commit is contained in:
张家训
2026-08-03 14:58:21 +08:00
parent 931b964226
commit de565541e1
8 changed files with 115 additions and 47 deletions
@@ -67,8 +67,7 @@ public class WorkUtilsApplication implements CommandLineRunner {
"damaged_repos.cache", "mybatis-generator.properties",
"workutils.config", "plugins.config"
};
java.nio.file.Path dataDir = java.nio.file.Paths.get(
System.getProperty("user.dir"), "data");
java.nio.file.Path dataDir = properties.getWorkutilsConfigFilePath().getParent();
StringBuilder sb = new StringBuilder("data 目录文件状态:\n");
for (String f : files) {
java.nio.file.Path p = dataDir.resolve(f);