Core Migration — POM upgrade, javax→jakarta namespace, and Spring Security 6 refactor#8
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
… 6 refactor - Upgrade Spring Boot 1.5.4 → 3.2.12, Java 1.8 → 17 - Rename mysql-connector-java → mysql-connector-j - Migrate javax.persistence → jakarta.persistence in all 9 domain/entity files - Migrate javax.servlet → jakarta.servlet in RequestFilter - Refactor SecurityConfig: remove WebSecurityConfigurerAdapter, use SecurityFilterChain bean, migrate to lambda DSL with requestMatchers/authorizeHttpRequests/@EnableMethodSecurity - Migrate findOne() → findById().orElse(null) in AppointmentServiceImpl (Spring Data JPA 2.x+) - Update test to JUnit 5 (remove @RunWith, use jupiter.api.Test) Resolves: COG-500 Co-Authored-By: Stephen Cornwell <stephen@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:
|
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 Java 8 / Spring Boot 1.5.4 to Java 17 / Spring Boot 3.2.12. This is ticket COG-500 — the foundational migration that must land before COG-501 through COG-504.
Changes (14 files):
A) POM / Build Configuration (
UserFront/pom.xml)spring-boot-starter-parent1.5.4.RELEASE → 3.2.12java.version1.8 → 17mysql-connector-java→mysql-connector-j(new artifact coordinates)B) javax.persistence → jakarta.persistence (9 domain files)
User.java,PrimaryAccount.java,SavingsAccount.java,PrimaryTransaction.java,SavingsTransaction.java,Appointment.java,Recipient.java,UserRole.java,Role.javaC) javax.servlet → jakarta.servlet (
RequestFilter.java)D) Spring Security 6 Refactor (
SecurityConfig.java)extends WebSecurityConfigurerAdapter(removed in Spring Security 6)configure(HttpSecurity)→@Bean SecurityFilterChain filterChain(HttpSecurity)configureGlobal(AuthenticationManagerBuilder)→@Bean DaoAuthenticationProviderantMatchers()→requestMatchers()authorizeRequests()→authorizeHttpRequests()with lambda DSL@EnableGlobalMethodSecurity→@EnableMethodSecurityUserSecurityServiceE) Spring Data JPA compatibility (
AppointmentServiceImpl.java)findOne(id)→findById(id).orElse(null)(API removed in Spring Data 2.x)F) Test migration (
UserFrontApplicationTests.java)@RunWith(SpringRunner.class)removed,org.junit.Test→org.junit.jupiter.api.Test)Verified
mvn compilepasses with zero errors (37 source files)Review & Testing Checklist for Human
WebSecurityConfigurerAdaptertoSecurityFilterChainbean pattern. Check that public matchers (/,/signup,/css/**, etc.) are accessible without auth, and protected routes redirect to login.UserSecurityService+BCryptPasswordEncoderare correctly picked up by the authentication provider bean. Test login with existing credentials.application.properties(deferred to COG-503). Before starting the app, verify that Hibernate dialect (MySQL5Dialect) and deprecated properties (testWhileIdle,validationQuery) don't cause startup failures.mvn testinUserFront/directory. The singlecontextLoadstest requires a MySQL database connection — it may need application.properties updates (COG-503) to pass.Notes
GenerationType.AUTOstrategy is kept as-is. Hibernate 6 may change its behavior for MySQL (defaulting to sequence instead of identity). If ID generation issues appear during runtime testing (COG-504), switching toGenerationType.IDENTITYwould be the fix.AppointmentServiceImpl.java— thefindOne()API was removed in Spring Data JPA 2.x, so this was a required fix for compilation.Link to Devin session: https://app.devin.ai/sessions/73857032729e415ca1fcf25a5b2af8c1
Requested by: @stephencornwell
Devin Review