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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user