feat: Upgrade Spring Boot 1.5.2 to 3.4.4 and modernize all dependencies#30
feat: Upgrade Spring Boot 1.5.2 to 3.4.4 and modernize all dependencies#30
Conversation
- Spring Boot 1.5.2.RELEASE -> 3.4.4 (Spring Framework 4 -> 6) - Telegrambots 6.5.0 -> 6.9.7.1 (handle MaybeInaccessibleMessage API change) - Migrate javax.* to jakarta.* (PostConstruct, Nonnull, Servlet) - Replace WebSecurityConfigurerAdapter with SecurityFilterChain - Migrate Apache HttpClient 4 to 5 (BotConfiguration, Request, RequestFactory) - Update Spring Data repositories for CrudRepository 3.x API (Optional returns, saveAll) - Migrate all 19 test files from JUnit 4 to JUnit 5 - Remove obsolete deps: spring-security-oauth2, jersey-bundle, commons-lang 2.x - Update jsoup, org.json, jsr305, xsoup, Groovy 4.0.24 - Let Spring Boot BOM manage versions for commons-lang3, gson, json-path, etc. - Fix pre-existing test bugs in AbstractTextAndNumberOperationsTest All 154 tests pass. Made-with: Cursor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 377aa4ac0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (message == null) { | ||
| if (update.hasCallbackQuery()) { | ||
| message = update.getCallbackQuery().getMessage(); | ||
| message = (Message) update.getCallbackQuery().getMessage(); |
There was a problem hiding this comment.
Handle inaccessible callback messages without casting
In telegrambots 6.9.7.1, CallbackQuery#getMessage() can return an InaccessibleMessage (via MaybeInaccessibleMessage) for callbacks on older/unavailable messages, so casting it directly to Message will throw ClassCastException and drop callback processing in onUpdateReceived. This regression appears in the callback path and will break bot interactions for those callbacks unless you branch on the runtime type and handle inaccessible messages safely.
Useful? React with 👍 / 👎.
- Added support for tagging Docker images based on GitHub references, including branches and tags. - Implemented GitHub Container Registry login step for secure image pushing. - Updated image build step to push images with dynamically determined tags. - Improved error handling and context management in the deployment process. This update streamlines the deployment process and ensures proper tagging for better version control.
…form into feature/upgrade
Spring Boot: 1.5.2.RELEASE -> 3.4.4 (Spring Framework 4 -> 6, Spring Security 4 -> 6, Spring Data 1 -> 3)
Telegrambots: 6.5.0 -> 6.9.7.1 (with MaybeInaccessibleMessage API adaptation)
javax -> jakarta migration across 13 source files
Security rewrite: WebSecurityConfigurerAdapter replaced with SecurityFilterChain bean
Apache HttpClient 4 -> 5 migration in BotConfiguration, Request, RequestFactory
Spring Data 3.x compatibility: Optional returns, saveAll(), findById()
JUnit 4 -> JUnit 5 migration for all 19 test files
Removed obsolete deps: spring-security-oauth2, jersey-bundle, commons-lang 2.x
Updated jsoup, org.json, jsr305, xsoup, Groovy; let Boot BOM manage shared deps
43 files changed, 212 insertions, 250 deletions.
Test plan
[x] mvn clean compile passes (111 source files, 0 errors)
[x] mvn test passes (154 tests, 0 failures, 0 errors)
[ ] Verify application starts successfully with MongoDB and Telegram credentials
[ ] Smoke-test bot commands in a test chat
All 154 tests pass.