Add REST annotations and refactor properties file handling

Introduced `@RestController` and `@RequestMapping` in `StaffAppController` for standardized API endpoints. Refactored properties file handling in `PropertiesLoader` and `PropertiesWriter` to simplify file creation logic.
This commit is contained in:
2024-08-06 23:17:06 +02:00
parent 04088c20e5
commit 2c3cb48667
4 changed files with 50 additions and 16 deletions
@@ -26,7 +26,7 @@ public class PropertiesLoader {
}
file = new File(currentJarPath.get(), fileName);
} else {
file = Path.of(URI.create("file://" + path + File.separator + fileName)).toFile();
file = new File(path, fileName);
}
@@ -25,7 +25,7 @@ public class PropertiesWriter {
}
file = new File(currentJarPath.get(), fileName);
} else {
file = Path.of(URI.create("file://" + path + File.separator + fileName)).toFile();
file = new File(path, fileName);
}
if (file.exists()) {