mirror of
https://github.com/gmbrax/MediaManager-core.git
synced 2026-11-09 14:00:17 +00:00
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:
parent
22476abb27
commit
3bb0423167
@@ -33,7 +33,9 @@ public class MediaManagerApplication {
|
||||
// Keep application running
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
logger.info("Shutting down MediaManager Core...");
|
||||
// TODO: Cleanup resources
|
||||
if (databaseManager != null) {
|
||||
databaseManager.close();
|
||||
}
|
||||
}));
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user