Upgrade Spring Boot to 2.5.6
* #931: upgrade Spring Boot to 2.5.6 * #931: add spring-boot-starter-validation dependency
This commit is contained in:
parent
83fba5aca3
commit
7bd3fdd152
3 changed files with 9 additions and 8 deletions
|
@ -18,7 +18,7 @@ import org.springframework.web.client.RestClientException;
|
||||||
import org.springframework.web.reactive.function.client.WebClientResponseException;
|
import org.springframework.web.reactive.function.client.WebClientResponseException;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
import reactor.retry.Retry;
|
import reactor.util.retry.Retry;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
|
public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
|
||||||
|
@ -30,9 +30,7 @@ public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
|
||||||
|
|
||||||
private static <T> Mono<T> withRetryOnConflict(Mono<T> publisher) {
|
private static <T> Mono<T> withRetryOnConflict(Mono<T> publisher) {
|
||||||
return publisher.retryWhen(
|
return publisher.retryWhen(
|
||||||
Retry.onlyIf(e -> e.exception() instanceof WebClientResponseException.Conflict)
|
Retry.max(MAX_RETRIES).filter(e -> e instanceof WebClientResponseException.Conflict))
|
||||||
.retryMax(MAX_RETRIES)
|
|
||||||
)
|
|
||||||
.onErrorResume(WebClientResponseException.Conflict.class,
|
.onErrorResume(WebClientResponseException.Conflict.class,
|
||||||
e -> Mono.error(new RebalanceInProgressException()))
|
e -> Mono.error(new RebalanceInProgressException()))
|
||||||
.doOnError(log::error);
|
.doOnError(log::error);
|
||||||
|
@ -40,9 +38,7 @@ public class RetryingKafkaConnectClient extends KafkaConnectClientApi {
|
||||||
|
|
||||||
private static <T> Flux<T> withRetryOnConflict(Flux<T> publisher) {
|
private static <T> Flux<T> withRetryOnConflict(Flux<T> publisher) {
|
||||||
return publisher.retryWhen(
|
return publisher.retryWhen(
|
||||||
Retry.onlyIf(e -> e.exception() instanceof WebClientResponseException.Conflict)
|
Retry.max(MAX_RETRIES).filter(e -> e instanceof WebClientResponseException.Conflict))
|
||||||
.retryMax(MAX_RETRIES)
|
|
||||||
)
|
|
||||||
.onErrorResume(WebClientResponseException.Conflict.class,
|
.onErrorResume(WebClientResponseException.Conflict.class,
|
||||||
e -> Mono.error(new RebalanceInProgressException()))
|
e -> Mono.error(new RebalanceInProgressException()))
|
||||||
.doOnError(log::error);
|
.doOnError(log::error);
|
||||||
|
|
|
@ -23,6 +23,11 @@
|
||||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
<version>${spring-boot.version}</version>
|
<version>${spring-boot.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -14,7 +14,7 @@
|
||||||
<maven.compiler.target>13</maven.compiler.target>
|
<maven.compiler.target>13</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<spring-boot.version>2.2.4.RELEASE</spring-boot.version>
|
<spring-boot.version>2.5.6</spring-boot.version>
|
||||||
<jackson-databind-nullable.version>0.2.1</jackson-databind-nullable.version>
|
<jackson-databind-nullable.version>0.2.1</jackson-databind-nullable.version>
|
||||||
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
|
<org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
|
||||||
<org.projectlombok.version>1.18.20</org.projectlombok.version>
|
<org.projectlombok.version>1.18.20</org.projectlombok.version>
|
||||||
|
|
Loading…
Add table
Reference in a new issue