Commit Graph

8 Commits

Author SHA1 Message Date
Gustavo Henrique Santos Souza de Miranda b7ff9d1e16 Improve logging, shutdown behavior, and build configuration:
- Enabled `immediateFlush` for log appenders and disabled `shutdownHook` in Log4j2 configuration.
- Enhanced shutdown hook with graceful Log4j2 termination and extended delay for log flushing.
- Improved database connection closure logging in `DatabaseManager`.
- Integrated Maven Shade Plugin to create executable JARs with all dependencies.
2025-11-13 17:10:23 -03:00
Gustavo Henrique Santos Souza de Miranda b0c45bf657 Refactor code for clarity and consistent formatting:
- Added missing braces in the shutdown hook.
- Removed unnecessary empty lines.
- Streamlined `try` block indentation in `loadConfiguration()`.
2025-11-13 05:58:57 -03:00
Gustavo Henrique Miranda 01f12c4e15
Merge branch 'develop' into feature/Database-Connector 2025-11-13 05:50:00 -03:00
Gustavo Henrique Santos Souza de Miranda 65e1493007 Improve shutdown hook and application lifecycle logging:
- Added graceful shutdown messages.
- Handled `InterruptedException` to ensure proper shutdown behavior.
- Included clear prompts for application status.
2025-11-13 05:40:01 -03:00
Gustavo Henrique Santos Souza de Miranda 3bb0423167 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.
2025-11-13 04:43:05 -03:00
Gustavo Henrique Santos Souza de Miranda 22476abb27 Add `DatabaseManager` class and initialize database connection
- Introduced `DatabaseManager` class to manage database connections.
- Updated `MediaManagerApplication` to initialize `DatabaseManager` using configuration properties.
2025-11-13 03:59:31 -03:00
Gustavo Henrique Santos Souza de Miranda 885d5c95a4 Replace `application.properties` with `config.properties`:
- Renamed configuration file to `config.properties` for consistency.
- Updated `MediaManagerApplication` to load the new configuration file.
- Adjusted references in `README.md` and `.gitignore`.
2025-11-13 03:25:33 -03:00
Gustavo Henrique Santos Souza de Miranda f66cfa6ea4 Initialize MediaManager-Core project with essential setup:
- Added `.gitignore` for common IDE and build artifacts.
- Configured `pom.xml` with dependencies: PostgreSQL, Hibernate, HikariCP, Log4j 2, Jackson, JUnit 5.
- Created `Media` entity with JPA annotations.
- Added `application.properties` for database and IPC configuration.
- Configured Log4j 2 with console and rolling file appenders.
- Provided `README.md` with setup instructions.
- Included `MediaManagerApplication` class as a starting point.
2025-11-13 02:24:11 -03:00