Ft/td 921 bump to SB3, JDK21 (#57)

* move to Spring Boot 2 and Jdk 21

* change kafka error handler and bump libs

* exclusion commons-logging lib
This commit is contained in:
Gretchen-z 2024-06-13 16:11:07 +03:00 committed by GitHub
parent b34e76443e
commit 55b6e33137
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 51 additions and 15 deletions

View File

@ -7,4 +7,4 @@ on:
jobs:
build:
uses: valitydev/java-workflow/.github/workflows/maven-service-build.yml@v2.0.11
uses: valitydev/java-workflow/.github/workflows/maven-service-build.yml@v3

View File

@ -12,7 +12,7 @@ env:
jobs:
deploy:
uses: valitydev/java-workflow/.github/workflows/maven-service-deploy.yml@v1
uses: valitydev/java-workflow/.github/workflows/maven-service-deploy.yml@v3
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}

52
pom.xml
View File

@ -7,7 +7,7 @@
<parent>
<groupId>dev.vality</groupId>
<artifactId>service-parent-pom</artifactId>
<version>2.1.8</version>
<version>3.0.0</version>
</parent>
<artifactId>magista</artifactId>
@ -32,6 +32,7 @@
<db.user>postgres</db.user>
<db.password>postgres</db.password>
<db.schema>mst</db.schema>
<shared-resources.version>3.0.0</shared-resources.version>
</properties>
<dependencies>
@ -73,11 +74,6 @@
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
@ -116,6 +112,12 @@
<dependency>
<groupId>software.amazon.msk</groupId>
<artifactId>aws-msk-iam-auth</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- dev.vality libs-->
@ -123,21 +125,39 @@
<groupId>dev.vality</groupId>
<artifactId>damsel</artifactId>
<version>1.611-958e5f0</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
<artifactId>payout-manager-proto</artifactId>
<version>1.39-b079679</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
<artifactId>magista-proto</artifactId>
<version>1.51-28d11b9</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dev.vality.woody</groupId>
<artifactId>woody-thrift</artifactId>
<version>1.0.5</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
@ -151,6 +171,16 @@
<dependency>
<groupId>dev.vality.geck</groupId>
<artifactId>serializer</artifactId>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dev.vality</groupId>
@ -160,6 +190,12 @@
<groupId>dev.vality</groupId>
<artifactId>machinegun-proto</artifactId>
<version>1.41-96f7f11</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Test libs-->
@ -176,7 +212,7 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>testcontainers-annotations</artifactId>
<version>1.4.3</version>
<version>2.0.3</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -14,7 +14,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory;
import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
import org.springframework.kafka.listener.ContainerProperties;
import org.springframework.kafka.listener.SeekToCurrentBatchErrorHandler;
import org.springframework.kafka.listener.DefaultErrorHandler;
import java.util.Map;
@ -95,7 +95,7 @@ public class KafkaConfig {
maxPollRecords,
kafkaProperties);
containerFactory.setConsumerFactory(consumerFactory);
containerFactory.setBatchErrorHandler(new SeekToCurrentBatchErrorHandler());
containerFactory.setCommonErrorHandler(new DefaultErrorHandler());
containerFactory.setBatchListener(true);
containerFactory.getContainerProperties().setAckMode(ContainerProperties.AckMode.MANUAL);
}

View File

@ -1,12 +1,12 @@
package dev.vality.magista.config.properties;
import jakarta.validation.constraints.NotEmpty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
@Getter
@Setter

View File

@ -2,10 +2,10 @@ package dev.vality.magista.endpoint;
import dev.vality.magista.MerchantStatisticsServiceSrv;
import dev.vality.woody.thrift.impl.http.THServiceBuilder;
import jakarta.servlet.*;
import jakarta.servlet.annotation.WebServlet;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;
@WebServlet("/v3/stat")