From 8a5246028458173c0f38fafed077ebcae8345e2d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 20:14:28 +0000 Subject: [PATCH] Upgrade to Java 21, Spring Boot 3.4.5, and modernize build tooling - Upgrade spring-boot-starter-parent from 3.3.3 to 3.4.5 - Upgrade java.version from 17 to 21 - Remove incorrect maven-compiler-plugin config (source/target 1.8) - Update mysql-connector-java to mysql-connector-j 9.1.0 - Update Maven wrapper distribution URL to Maven 3.9.9 - Update Dockerfile to maven:3.9-eclipse-temurin-21 and eclipse-temurin:21-jre-alpine - Replace deprecated MySQL8Dialect with MySQLDialect - Make mvnw executable Co-Authored-By: Arjun Mishra --- .mvn/wrapper/maven-wrapper.properties | 2 +- Dockerfile | 4 ++-- mvnw | 0 pom.xml | 18 +++++------------- src/main/resources/application.properties | 2 +- 5 files changed, 9 insertions(+), 17 deletions(-) mode change 100644 => 100755 mvnw diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 8f96f52c..654af46a 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/Dockerfile b/Dockerfile index 079acabe..f90cf252 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ #---------------------------------- # Import docker image with maven installed -FROM maven:3.8.3-openjdk-17 as builder +FROM maven:3.9-eclipse-temurin-21 as builder # Add maintainer, so that new user will understand who had written this Dockerfile MAINTAINER Madhup Pandey @@ -25,7 +25,7 @@ RUN mvn clean install -DskipTests=true #-------------------------------------- # Import small size java image -FROM openjdk:17-alpine as deployer +FROM eclipse-temurin:21-jre-alpine as deployer # Copy build from stage 1 (builder) COPY --from=builder /src/target/*.jar /src/target/bankapp.jar diff --git a/mvnw b/mvnw old mode 100644 new mode 100755 diff --git a/pom.xml b/pom.xml index fc5bfeac..bcf9b826 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.3.3 + 3.4.5 com.example @@ -27,7 +27,7 @@ - 17 + 21 @@ -53,8 +53,8 @@ mysql - mysql-connector-java - 8.0.33 + mysql-connector-j + 9.1.0 runtime @@ -75,15 +75,7 @@ org.springframework.boot spring-boot-maven-plugin - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.0 - - 1.8 - 1.8 - - + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 08663a63..97d40e36 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -7,5 +7,5 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # JPA & Hibernate configuration spring.jpa.hibernate.ddl-auto=update -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect spring.jpa.show-sql=true