Migrate UserFront from Java 8/Spring Boot 1.5.4 to Java 17/Spring Boot 3.2.5#5
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
Migrate UserFront from Java 8/Spring Boot 1.5.4 to Java 17/Spring Boot 3.2.5#5devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
…t 3.2.5 - Update pom.xml: Java 17, Spring Boot 3.2.5, mysql-connector-j - Update Maven wrapper to 3.9.6 - Migrate javax.persistence -> jakarta.persistence in all entities - Migrate javax.servlet -> jakarta.servlet in RequestFilter - Change GenerationType.AUTO to GenerationType.IDENTITY for MySQL/Hibernate 6 - Rewrite SecurityConfig for Spring Security 6 (remove WebSecurityConfigurerAdapter) - Update application.properties: MySQLDialect, HikariCP config - Fix AppointmentServiceImpl: findOne() -> findById().orElse(null) - Migrate test to JUnit 5 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:
|
…ointment Addresses Devin Review feedback - confirmAppointment would NPE on non-existent appointment IDs since it dereferences without null check. Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Spring Boot 3.x prohibits circular references by default. The legacy codebase has circular dependencies that would require significant refactoring to resolve. Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Spring Security 6's PathPatternParser does not allow path segments after ** glob. This caused PatternParseException and empty responses for Thymeleaf pages like /signup. Co-Authored-By: Stephen Cornwell <stephen@cognition.ai>
Author
End-to-End Test ResultsTested locally: Backend on :8080 with MySQL 8, AdminPortal Angular app on :4200. Full signup → login → dashboard → admin API flow. All 4 tests passed
Test 1 & 2: Signup → Login → Dashboard
Proves: jakarta.persistence entities work, GenerationType.IDENTITY works with Hibernate 6/MySQL, Spring Security 6 SecurityFilterChain + BCryptPasswordEncoder + DaoAuthenticationProvider all functional. Test 3 & 4: AdminPortal API Communication
Proves: jakarta.servlet CORS filter works, @PreAuthorize("hasRole('ADMIN')") works with @EnableMethodSecurity, REST endpoints return correct JSON, Angular ↔ Spring Boot 3.2.5 cross-origin communication works. Migration Components Verified
|
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 Spring Boot backend from Java 8 / Spring Boot 1.5.4.RELEASE to Java 17 / Spring Boot 3.2.5. All changes are confined to the
UserFront/module.Changes made:
Build & tooling:
pom.xml: Java 17, Spring Boot 3.2.5,mysql-connector-j(replacesmysql-connector-java)Namespace migration (
javax.*→jakarta.*):javax.persistence.*→jakarta.persistence.*(User, PrimaryAccount, SavingsAccount, Appointment, PrimaryTransaction, SavingsTransaction, Recipient, Role, UserRole)RequestFilter.java:javax.servlet.*→jakarta.servlet.*Hibernate 6 / MySQL compatibility:
GenerationType.AUTO→GenerationType.IDENTITYin all 8 entity@GeneratedValueannotationsMySQL5DialecttoMySQLDialecttestWhileIdle/validationQueryreplaced withspring.datasource.hikari.connection-test-querySpring Security 6:
SecurityConfig.java— removedWebSecurityConfigurerAdapter(deleted in Security 6), replaced withSecurityFilterChainbean,DaoAuthenticationProvider, andAuthenticationManagerbeans@EnableGlobalMethodSecurity→@EnableMethodSecurity/error/**/*→/error/**(Spring Security 6's PathPatternParser does not allow path segments after**)Spring Data 3.x:
AppointmentServiceImpl:findOne(id)→findById(id).orElseThrow()(also fixes pre-existing potential NPE inconfirmAppointment)Spring Boot 3.x compatibility:
spring.main.allow-circular-references=truefor legacy circular bean dependenciesTesting:
UserFrontApplicationTestsmigrated from JUnit 4 (@RunWith(SpringRunner.class)) to JUnit 5 (@SpringBootTestonly)End-to-end testing verified:
./mvnw clean compile— BUILD SUCCESS./mvnw test— 1 test run, 0 failuresReview & Testing Checklist for Human
./mvnw clean compile— should succeed with zero errors./mvnw spring-boot:run— app should start on port 8080ROLE_USERbefore first signup:INSERT INTO role (role_id, name) VALUES (0, 'ROLE_USER');Notes
spring.main.allow-circular-references=truewas added for legacy circular bean dependencies — resolving would require significant refactoringROLE_USERbefore signup will work (the app'sroleDao.findByName("ROLE_USER")returns null otherwise)Link to Devin session: https://app.devin.ai/sessions/5e343d2dd36142c1ae42da7a8ebf8d07
Requested by: @stephencornwell
Devin Review