Переход на quarkus 3
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Struchkov Mark 2023-05-17 18:51:34 +03:00
parent d488609b53
commit 590f57f96d
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
12 changed files with 43 additions and 38 deletions

30
pom.xml
View File

@ -4,7 +4,7 @@
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-parent-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@ -37,7 +37,7 @@
<lombok.version>1.18.26</lombok.version>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<plugin.maven.compiler.ver>3.10.1</plugin.maven.compiler.ver>
<plugin.maven.compiler.ver>3.11.0</plugin.maven.compiler.ver>
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
<plugin.nexus.staging.ver>1.6.13</plugin.nexus.staging.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
@ -45,9 +45,10 @@
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
<plugin.maven.javadoc.ver>3.5.0</plugin.maven.javadoc.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
<plugin.maven.gpg.ver>3.0.1</plugin.maven.gpg.ver>
<plugin.maven.gpg.ver>3.1.0</plugin.maven.gpg.ver>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
<plugin.maven.release.ver>3.0.0-M7</plugin.maven.release.ver>
<plugin.maven.release.ver>3.0.0</plugin.maven.release.ver>
<plugin.maven.jandex.version>3.1.1</plugin.maven.jandex.version>
</properties>
<dependencyManagement>
@ -55,25 +56,25 @@
<dependency>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-model</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-context-quarkus</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.smallrye.reactive/mutiny -->
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-reactive-jackson</artifactId>
<version>2.16.6.Final</version>
<version>3.0.3.Final</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
@ -108,6 +109,19 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>${plugin.maven.jandex.version}</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-parent-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>yookassa-context</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-context</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>yookassa-context-quarkus</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-parent-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>yookassa-model</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-parent-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>yookassa-sdk</artifactId>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>dev.struchkov.yookassa</groupId>
<artifactId>yookassa-sdk</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>yookassa-quarkus-sdk</artifactId>
@ -32,19 +32,9 @@
<build>
<plugins>
<!-- jandex необходим для генерируемого rest клиента! -->
<plugin>
<groupId>io.smallrye</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>3.0.5</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -9,11 +9,11 @@ import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
@Path("v3/payments")
@Consumes(MediaType.APPLICATION_JSON)

View File

@ -7,13 +7,13 @@ import io.smallrye.mutiny.Uni;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import static java.lang.Boolean.TRUE;
@ -29,6 +29,7 @@ public class YooKassaWebhookController {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Uni<Response> callback(YooKassaNotification notification, @QueryParam("accessKey") String accessKey) {
log.info("Получен CallBack от YooKassa: {}", notification);
if (yooKassaProp != null) {
final String webhookAccessKey = yooKassaProp.getWebhookAccessKey();
if (webhookAccessKey != null && (!webhookAccessKey.equals(accessKey))) {

View File

@ -2,8 +2,8 @@ package dev.struchkov.yookassa.sdk.util;
import dev.struchkov.yookassa.sdk.model.request.PaymentRequest;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import jakarta.ws.rs.client.ClientRequestContext;
import jakarta.ws.rs.client.ClientRequestFilter;
import java.io.IOException;
public class IdempotenceKeyClientFilter implements ClientRequestFilter {

View File

@ -5,7 +5,7 @@ import dev.struchkov.yookassa.sdk.model.response.YooKassaApiErrorResponse;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.microprofile.rest.client.ext.ResponseExceptionMapper;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
@Slf4j
public class YookassaExceptionHandler implements ResponseExceptionMapper<Exception> {