-
Notifications
You must be signed in to change notification settings - Fork 0
Add backup and config versioning annotations with handling logic #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds backup and configuration versioning capabilities to the configuration library, including three new annotations (@Backup, @ConfigVersion, @OnReload), a BackupHandler utility class, and integrates these features into the core configuration loading logic. Additionally, the PR translates error messages from Turkish to English throughout the codebase.
- Introduces backup functionality with automatic backup on config failures and version migrations
- Adds configuration versioning support to track and upgrade config file versions
- Provides reload hook mechanism via
@OnReloadannotation for post-reload operations
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| BackupHandler.java | New utility class for creating timestamped config backups |
| ConfigVersion.java | New annotation to mark config classes with version numbers |
| OnReload.java | New annotation to mark methods that should run on config reload |
| Backup.java | New annotation to configure backup behavior (enabled, path, triggers) |
| ConfigMapper.java | Adds version handling and reload hook execution; translates error messages to English |
| Configuration.java | Integrates backup and versioning logic into config initialization flow; translates comments and error messages |
| ItemStackConverter.java | Translates error message from Turkish to English |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/bentahsin/configuration/annotation/OnReload.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/configuration/annotation/ConfigVersion.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/configuration/annotation/Backup.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/configuration/annotation/Backup.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/configuration/annotation/Backup.java
Outdated
Show resolved
Hide resolved
src/main/java/com/bentahsin/configuration/annotation/Backup.java
Outdated
Show resolved
Hide resolved
…java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…sion.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.