Java 21 and Spring Boot 3.4 upgrade #34
Draft
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.
Upgrade Java Project
🖥️ Project Information
🎯 Goals
🔀 Changes
Test Changes
Dependency Changes
Upgraded Dependencies
Added Dependencies
Removed Dependencies
Code commits
25 files changed, 105 insertions(+), 101 deletions(-)
6040910 -- Upgrade Spring Boot from 2.1.3 to 3.3.8 and Java from 8 to 21
90b5da1 -- Add explicit version for jakarta.cache:cache-api dependency
70d558b -- Use correct jakarta.cache:cache-api version 1.1.2
28658b1 -- Revert cache API back to javax.cache as jakarta.cache doesn't exist
17ea34e -- Upgrade Spring Boot from 3.3.8 to 3.4.1 and migrate deprecated test annotations
Potential Issues
Behavior Changes
get(0)togetFirst(). While both should return the first element,getFirst()is a Java 21 method that may have different exception behavior - it throwsNoSuchElementExceptionon empty lists whileget(0)throwsIndexOutOfBoundsException. This could affect test behavior if the list is unexpectedly empty.get(0)togetFirst()method. ThegetFirst()method is a new Java 21 feature that provides more semantic clarity but functionally equivalent behavior for accessing the first element.@Autowiredannotation from constructor. In Spring Boot 3.x with single constructor, this annotation is optional and the behavior remains functionally equivalent - Spring will still perform dependency injection.@Autowiredannotation from constructor. In Spring Boot 3.x with single constructor, this annotation is optional and the behavior remains functionally equivalent - Spring will still perform dependency injection.@RequestMappingwith more specific@PostMapping. This is functionally equivalent - both map POST requests to the same endpoint with identical behavior.@RequestMappingwith@GetMappingand removed explicit parameter name from@PathVariable. Both changes are functionally equivalent - the mapping behavior and parameter binding remain identical.@RequestMappingwith@PutMappingand removed explicit parameter name from@PathVariable. Both changes are functionally equivalent - the mapping behavior and parameter binding remain identical.@Autowiredannotation from constructor. In Spring Boot 3.x with single constructor, this annotation is optional and the behavior remains functionally equivalent - Spring will still perform dependency injection.@PathVariable. This is functionally equivalent - Spring will automatically match the parameter name with the path variable name.@PathVariable. This is functionally equivalent - Spring will automatically match the parameter name with the path variable name.@Autowiredannotation from constructor. In Spring Boot 3.x with single constructor, this annotation is optional and the behavior remains functionally equivalent - Spring will still perform dependency injection.@Autowiredannotation from constructor. In Spring Boot 3.x with single constructor, this annotation is optional and the behavior remains functionally equivalent - Spring will still perform dependency injection.@PathVariable. This is functionally equivalent - Spring will automatically match the parameter name with the path variable name.@PathVariable. This is functionally equivalent - Spring will automatically match the parameter name with the path variable name.