Enhance DatabaseManager with logging, validation, and cleanup

- Added detailed logging for database initialization and connection handling.
- Implemented configuration validation and sanity checks during initialization.
- Introduced `close()` method to properly release database resources.
- Updated `MediaManagerApplication` to invoke `DatabaseManager.close()` on shutdown.
- Updated `.gitignore` to exclude sensitive configuration files while allowing example files.
This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-11-13 04:43:05 -03:00
parent 22476abb27
commit 3bb0423167
4 changed files with 79 additions and 2 deletions
+8
View File
@@ -44,3 +44,11 @@ config-local.properties
pipes/
*.log
/.idea/
Configuration files with sensitive credentials
# These files contain database passwords and API keys and should never be committed
src/main/resources/config.properties
src/main/resources/application.properties
# Allow example configuration files to be committed
!src/main/resources/*.properties.example