Skip to content

Upgrade to Java 8 and Spring Boot 3.5.1 - Appmod/java upgrade 20250929193125#4

Draft
yortch wants to merge 12 commits into
masterfrom
appmod/java-upgrade-20250929193125
Draft

Upgrade to Java 8 and Spring Boot 3.5.1 - Appmod/java upgrade 20250929193125#4
yortch wants to merge 12 commits into
masterfrom
appmod/java-upgrade-20250929193125

Conversation

@yortch
Copy link
Copy Markdown
Owner

@yortch yortch commented Sep 29, 2025

Upgrade Java Project

🖥️ Project Information

  • Project path: c:\Users\jbalderas\source\repos\spring-petclinic-angularjs\spring-petclinic-server
  • Java version: 21
  • Build tool type: Maven
  • Build tool path: C:\Users\jbalderas\apps\apache-maven-3.9.6\bin

🎯 Goals

  • Upgrade Java to 21
  • Upgrade Spring Boot to 3.5.x

🔀 Changes

Test Changes

Total Passed Failed Skipped Errors
Before 3 3 0 0 0
After 3 3 0 0 0

Dependency Changes

Upgraded Dependencies

Dependency Original Version Current Version Module
org.springframework.boot:spring-boot-starter-web 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-starter-thymeleaf 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-starter-data-jpa 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-starter-cache 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-starter-actuator 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-devtools 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.springframework.boot:spring-boot-configuration-processor 2.1.3.RELEASE 3.5.1 spring-petclinic-server
org.hsqldb:hsqldb 2.4.1 2.7.3 spring-petclinic-server
org.springframework.boot:spring-boot-starter-test 2.1.3.RELEASE 3.5.1 spring-petclinic-server
Java 8 21 Root Module

Added Dependencies

Dependency Version Module
jakarta.xml.bind:jakarta.xml.bind-api 4.0.4 spring-petclinic-server
org.springframework.boot:spring-boot-starter-validation 3.5.1 spring-petclinic-server
org.junit.jupiter:junit-jupiter 5.13.4 spring-petclinic-server
com.mysql:mysql-connector-j 9.2.0 spring-petclinic-server
org.glassfish.jaxb:jaxb-runtime 4.0.5 spring-petclinic-server
com.github.ben-manes.caffeine:caffeine 3.2.1 spring-petclinic-server

Removed Dependencies

Dependency Version Module
mysql:mysql-connector-java 8.0.15 spring-petclinic-server
javax.cache:cache-api 1.1.0 spring-petclinic-server
org.ehcache:ehcache 3.6.3 spring-petclinic-server

Code commits

All code changes have been committed to branch appmod/java-upgrade-20250929193125, here are the details:
25 files changed, 112 insertions(+), 132 deletions(-)

  • 5b2704c -- Upgrade project to Spring Boot 3.3.x, Java 21 using openrewrite.

  • 50b5f3d -- Upgrade to Spring Boot 3.3.6 and Java 21 for Milestone 1

  • 517c790 -- Fix missing dependency versions for jakarta.cache and ehcache

  • ebf77da -- Replace cache setup with Spring Boot 3.x compatible Caffeine cache

  • 18fc448 -- Simplify cache configuration to work with Spring Boot 3.x and Caffeine

  • 8992b87 -- Add explicit Jakarta persistence and validation API dependencies

  • 1c6e078 -- Fix corrupted parent POM XML structure with Spring Boot 3.3.6

  • f44eb3c -- Fix Spring Boot Maven plugin build-info configuration for Java 21

  • 9e27778 -- Upgrade Spring Boot to 3.5.1

  • 1ca2dc5 -- Fix CVE-2023-22102 by upgrading MySQL Connector/J to 9.2.0

  • 57b4d17 -- Fix content type assertion in PetResourceTests for Spring Boot 3.5 compatibility

Potential Issues

Behavior Changes

  • CacheConfig.java
    • [Severity: MAJOR] [Confidence: MEDIUM] The removal of the JCacheManagerCustomizer bean and all EhCache-specific configurations means the 'vets' cache no longer has explicit size limits (100 entries) or TTL (60 seconds). The application now relies on default Caffeine cache behavior which may have different eviction policies and memory management.
  • AbstractClinicServiceTests.java
    • [Severity: MINOR] [Confidence: MEDIUM] Changed from index-based access get(0) to getFirst() method. Both methods should return the first element, but getFirst() will throw NoSuchElementException if the list is empty while get(0) would throw IndexOutOfBoundsException. This could potentially change exception handling behavior in edge cases.
  • ClinicServiceImpl.java
    • [Severity: MINOR] [Confidence: LOW] Changed from JSR-107 caching annotation to Spring's caching annotation. Both annotations provide caching functionality for the same cache name 'vets', maintaining functional equivalence.
  • PetResourceTests.java
    • [Severity: MINOR] [Confidence: LOW] The expected content type changed from including explicit charset specification to just the media type. This reflects changes in Spring Boot 3.x default content type handling but maintains the same JSON response functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant