From 49af4a3067d260c671c248d8ce80777654b7a402 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 28 Apr 2024 21:25:09 +0200 Subject: [PATCH] Add database configuration via command-line arguments A new configuration setup now allows specifying a path for database properties via command-line arguments during application startup. This update also changes the call signature for `DatabaseConnection.initialize()` method to accept a path argument. Similarly, methods in `PropertiesLoader`, `PropertiesWriter`, and `MailSettings` classes were also updated to use the specified path when working with properties files. The `TestForm` class's tests were updated accordingly to handle these changes. --- .idea/workspace.xml | 125 ++++++++++++------ src/main/java/com/alttd/forms/Main.java | 8 +- .../forms/database/DatabaseConnection.java | 24 +++- .../com/alttd/forms/mail/MailSettings.java | 12 +- .../forms/properties/PropertiesLoader.java | 20 ++- .../forms/properties/PropertiesWriter.java | 20 ++- src/main/resources/application.properties | 3 +- src/test/java/TestForm.java | 4 +- 8 files changed, 150 insertions(+), 66 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index baa2503..07c0a27 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,14 +4,15 @@