Migrate to Spring Boot 3.3.6 with Java 21#9
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Conversation
- Update pom.xml: Spring Boot 1.5.4 -> 3.3.6, Java 1.8 -> 21 - Remove redundant spring-boot-starter-jdbc dependency - Replace mysql-connector-java with mysql-connector-j - Migrate javax.persistence -> jakarta.persistence in all domain entities - Migrate javax.servlet -> jakarta.servlet in RequestFilter - Rewrite SecurityConfig for Spring Security 6.x (lambda DSL) - Update application.properties: MySQL5Dialect -> MySQLDialect, add timezone, use Hikari config - Fix findOne() -> findById().orElse(null) in AppointmentServiceImpl Co-Authored-By: David Mitev <david.mitev@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: David Mitev <david.mitev@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the
UserFront/module from Spring Boot 1.5.4 (Java 8) to Spring Boot 3.3.6 (Java 21). This is a major version jump spanning two major Spring Boot generations.Key changes:
spring-boot-starter-jdbc, replacedmysql:mysql-connector-javawithcom.mysql:mysql-connector-jRole,UserRole, andRequestFiltermigrated fromjavax.persistence.*/javax.servlet.*tojakarta.persistence.*/jakarta.servlet.*WebSecurityConfigurerAdapter, switched toSecurityFilterChainbean with lambda DSL,@EnableGlobalMethodSecurity→@EnableMethodSecurity, usesDaoAuthenticationProviderbean instead ofconfigureGlobalMySQL5Dialect→MySQLDialect, deprecated pool config replaced with Hikari equivalent, added?serverTimezone=UTCfindOne(id)→findById(id).orElse(null)(Spring Data JPA 3.x API)UserFrontApplicationTestsmigrated from JUnit 4 (org.junit.Test,@RunWith(SpringRunner.class)) to JUnit 5 Jupiter (org.junit.jupiter.api.Test, no runner needed)Compilation verified with
mvn clean compile— passes cleanly on Java 21. No runtime testing was performed — the app requires a MySQL database which was not available in the build environment.Review & Testing Checklist for Human
DaoAuthenticationProviderbean +SecurityFilterChainvs.WebSecurityConfigurerAdapter.configureGlobal). Verify login, logout, remember-me, and public URL access all work as before.rememberMenow explicitly usesuserSecurityService: The old config called.rememberMe()with no explicitUserDetailsService. The new config passes it explicitly. Verify remember-me cookies still work correctly — this is a behavioral change, not just a syntactic one.ddl-auto=update) that only surface with a live database.findById().orElse(null)inAppointmentServiceImpl:confirmAppointment()does not null-check the result before callingsetConfirmed(). Pre-existing issue, but now more visible — consider whether this should throw instead.Recommended test plan: Stand up a local MySQL
onlinebankingdatabase, runmvn spring-boot:runwith Java 21, and walk through: user signup → login → deposit → transfer → view statements → schedule appointment → admin confirm appointment → logout. Verify remember-me works by closing and reopening the browser.Notes
spring-boot-starter-jdbcremoval is safe sincespring-boot-starter-data-jpatransitively includes it.application.propertiesare pre-existing and not introduced by this PR.Link to Devin session: https://app.devin.ai/sessions/d17b25b94f7842f3b59493f194ed2e0d
Requested by: @davidmitev-eng
Devin Review