Skip to content

Commit

Permalink
inital upgraded to java 21 and spring boot 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
thiennn committed Dec 11, 2023
1 parent 39d5d98 commit fd5437d
Show file tree
Hide file tree
Showing 32 changed files with 68 additions and 110 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ YAS is a pet project aim to practice building a typical microservice application

## Tentative technologies and frameworks

- Java 17
- Spring boot 3
- Java 21
- Spring boot 3.2
- Next.js
- Keycloak
- Kafka
Expand Down
2 changes: 1 addition & 1 deletion backoffice-bff/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:17-jdk-alpine
FROM openjdk:21-jdk-alpine
RUN apk add --no-cache bash
COPY target/backoffice-bff-0.0.1-SNAPSHOT.jar backoffice-bff-0.0.1-SNAPSHOT.jar
COPY wait-for-it.sh wait-for-it.sh
Expand Down
27 changes: 2 additions & 25 deletions backoffice-bff/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,7 +14,7 @@
<name>backoffice-bff</name>
<description>Backend for backoffice</description>
<properties>
<java.version>17</java.version>
<java.version>21</java.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -93,29 +93,6 @@
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>https://repo.spring.io/snapshot</url>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion cart/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/cart-0.0.1-SNAPSHOT.jar cart-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/cart-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions cart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<description>YAS Cart service</description>

<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion customer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/customer-0.0.1-SNAPSHOT.jar customer-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/customer-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions customer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<description>YAS Customer service</description>

<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down
2 changes: 1 addition & 1 deletion inventory/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/inventory-0.0.1-SNAPSHOT.jar inventory-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/inventory-0.0.1-SNAPSHOT.jar"]

8 changes: 3 additions & 5 deletions inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<name>inventory</name>
<description>YAS Inventory Service</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion location/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/location-0.0.1-SNAPSHOT.jar location-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/location-0.0.1-SNAPSHOT.jar"]

8 changes: 3 additions & 5 deletions location/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<name>location</name>
<description>YAS Location Service</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion media/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM openjdk:17-jdk-alpine
FROM openjdk:21-jdk-alpine
COPY target/media-0.0.1-SNAPSHOT.jar media-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java","-jar","/media-0.0.1-SNAPSHOT.jar"]
4 changes: 2 additions & 2 deletions media/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -13,7 +13,7 @@
<name>media</name>
<description>Yas Media service</description>
<properties>
<java.version>17</java.version>
<java.version>21</java.version>
<sonar.organization>nashtech-garage</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.projectKey>nashtech-garage_yas-media</sonar.projectKey>
Expand Down
2 changes: 1 addition & 1 deletion order/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine

ADD target/order-0.0.1-SNAPSHOT.jar order.jar
ENTRYPOINT ["java", "-jar", "/order.jar"]
8 changes: 3 additions & 5 deletions order/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -13,11 +13,9 @@
<name>order</name>
<description>Order Service for yas project</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion payment-paypal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/payment-paypal-0.0.1-SNAPSHOT.jar payment-paypal-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/payment-paypal-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions payment-paypal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<name>payment-paypal</name>
<description>Payment with paypal service for yas project</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion payment/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/payment-0.0.1-SNAPSHOT.jar payment-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/payment-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions payment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -13,11 +13,9 @@
<name>payment</name>
<description>Payment Service for Yas Project</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion product/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/product-0.0.1-SNAPSHOT.jar product-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/product-0.0.1-SNAPSHOT.jar"]
13 changes: 8 additions & 5 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -15,12 +15,10 @@
<description>YAS Product service</description>

<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.4</springdoc-openapi-starter-webmvc-ui.version>
<spring-boot-devtools.version>3.1.0</spring-boot-devtools.version>
<org.lombok.version>1.18.22</org.lombok.version>
<lombok.version>1.18.30</lombok.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -148,6 +146,11 @@
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion promotion/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/promotion-0.0.1-SNAPSHOT.jar promotion-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/promotion-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions promotion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -14,11 +14,9 @@
<name>promotion</name>
<description>YAS Promotion Service</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
2 changes: 1 addition & 1 deletion rating/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM eclipse-temurin:17-jre-alpine
FROM eclipse-temurin:21-jre-alpine
ADD target/rating-0.0.1-SNAPSHOT.jar rating-0.0.1-SNAPSHOT.jar
ENTRYPOINT ["java", "-jar", "/rating-0.0.1-SNAPSHOT.jar"]
8 changes: 3 additions & 5 deletions rating/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.yas</groupId>
Expand All @@ -13,11 +13,9 @@
<name>rating</name>
<description>YAS Rating service</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<springdoc-openapi-starter-webmvc-ui.version>2.0.2</springdoc-openapi-starter-webmvc-ui.version>
<org.lombok.version>1.18.22</org.lombok.version>
<org.lombok.version>1.18.30</org.lombok.version>
<org.mapstruct.version>1.4.1.Final</org.mapstruct.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<sonar.organization>nashtech-garage</sonar.organization>
Expand Down
Loading

0 comments on commit fd5437d

Please sign in to comment.