Skip to content

Commit

Permalink
feature: upgrade for Java 21 and Spring Boot 3.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Henrique Medeiros committed Sep 26, 2023
1 parent 3b67cd4 commit 2e1aebd
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 83 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Checkout project
uses: actions/checkout@v3

- name: Configure AdoptOpenJDK 17
uses: actions/setup-java@v2
- name: Configure AdoptOpenJDK 21
uses: actions/setupx-java@v2
with:
java-version: "17"
distribution: "adopt"
java-version: "21"
distribution: "zulu"

- name: Maven build
run: mvn -B package --file pom.xml
6 changes: 3 additions & 3 deletions .github/workflows/vulnerability_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure AdoptOpenJDK 17
- name: Configure AdoptOpenJDK 21
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: "adopt"
java-version: "21"
distribution: "zulu"

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM maven:3.8.5-openjdk-17 AS build
FROM maven:3.9.4-amazoncorretto-21 AS build

COPY pom.xml .
RUN mvn dependency:go-offline

COPY src src
RUN mvn package

FROM openjdk:17.0.2 AS release
FROM azul/zulu-openjdk:21 AS release

COPY --from=build /target/*.jar /app.jar

ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar /
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.30.0/opentelemetry-javaagent.jar /

COPY docker-entrypoint.sh /

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Esta arquitetura consiste em diminuir a concorrência entre transações da API
</br>
</br>

[![node](https://img.shields.io/badge/AdoptOpenJDK-17-red.svg)](https://adoptopenjdk.net/)
[![node](https://img.shields.io/badge/Spring_Boot-3.1.3-green.svg)](https://spring.io/)
[![node](https://img.shields.io/badge/AdoptOpenJDK-21-red.svg)](https://adoptopenjdk.net/)
[![node](https://img.shields.io/badge/Spring_Boot-3.1.4-green.svg)](https://spring.io/)
[![node](https://img.shields.io/badge/MySQL-8.0.28-blue.svg)](https://www.mysql.com/)


Expand Down
Binary file modified agents/opentelemetry-javaagent.jar
Binary file not shown.
143 changes: 75 additions & 68 deletions docs/replication-databases

Large diffs are not rendered by default.

Binary file modified docs/replication-databases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions 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.3</version>
<version>3.1.4</version>
<relativePath/>
</parent>

Expand All @@ -15,15 +15,15 @@
<name>multidatasources</name>

<properties>
<java.version>17</java.version>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<logstash-logback-encoder.version>7.4</logstash-logback-encoder.version>
<springdoc-openapi-starter-webmvc-ui.version>2.2.0</springdoc-openapi-starter-webmvc-ui.version>
<snakeyaml.version>2.2</snakeyaml.version>
<h2.version>2.2.220</h2.version>
<opentelemetry.version>1.29.0</opentelemetry.version>
<opentelemetry.version>1.30.0</opentelemetry.version>
</properties>

<dependencyManagement>
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ spring:
"[hibernate.connection.provider_disables_autocommit]": true
"[hibernate.connection.handling_mode]": DELAYED_ACQUISITION_AND_RELEASE_AFTER_TRANSACTION

# SPRING VIRTUAL THREADS FOR JAVA 21
threads:
virtual:
enabled: true

# OPEN API CONFIGURATION
springdoc:
api-docs:
Expand Down

0 comments on commit 2e1aebd

Please sign in to comment.