Upgrade Guide To Spring Boot 3.0 for Spring Data JPA and Querydsl
Last year, I wrote two articles about JPA Criteria and Querydsl (see Introduction and Metamodel articles). Since the end of last year, Â there’s been a new major release of Spring Boot 3. This release is based on Spring Framework 6 with several significant changes and issues which we should consider when upgrading.
The goal of this article is to highlight these changes when upgrading the sat-jpa project (SAT project). The technologies used here are:
- Spring Boot 3.0.2,
- Hibernate 6.1.6.Final
- Spring Data JPA 3.0.1 and
- Querydsl 5.0.0.
Spring Framework 6 has many changes (see What’s New in Spring Framework 6.x), the key changes are:
- Switch Java baseline to Java 17 (still the last Java LTS at the time of writing this article) — i.e., it’s a minimum Java version we have to use.
@Override
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException exception,
HttpHeaders headers, HttpStatus status, WebRequest request) {
return buildResponse(BAD_REQUEST, exception);
}
@Override
protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException exception,
HttpHeaders headers, HttpStatusCode status, WebRequest request) {
return buildResponse(BAD_REQUEST, exception);
}