Commit c4f3408f by Lizh

http/https封装工具增加文件上传逻辑的处理,并且低调工具的目录到integrate目录下

parent c43128f2
......@@ -46,17 +46,5 @@
<artifactId>spring-boot-starter-aop</artifactId>
<version>4.0.0-M2</version>
</dependency>
<!-- WebClient for HTTP calls -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- Resilience4j for circuit breaker and retry -->
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot3</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>
</project>
......@@ -25,5 +25,21 @@
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- WebClient for HTTP calls -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- Resilience4j for circuit breaker and retry -->
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot3</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>
</project>
package com.jomalls.custom.app.client;
package com.jomalls.custom.integrate.client;
import io.github.resilience4j.retry.event.RetryOnErrorEvent;
import io.github.resilience4j.retry.event.RetryOnRetryEvent;
......
package com.jomalls.custom.config;
package com.jomalls.custom.integrate.configuration;
import io.netty.channel.ChannelOption;
import lombok.extern.slf4j.Slf4j;
......
package com.jomalls.custom.app.exception;
package com.jomalls.custom.integrate.exception;
import lombok.Getter;
import org.springframework.http.HttpStatus;
......
......@@ -3,7 +3,7 @@ package com.jomalls.custom.config;
import com.jomalls.custom.app.enums.CodeEnum;
import com.jomalls.custom.app.exception.InvalidTokenException;
import com.jomalls.custom.app.exception.PermissionDeniedException;
import com.jomalls.custom.app.exception.RemoteServiceException;
import com.jomalls.custom.integrate.exception.RemoteServiceException;
import com.jomalls.custom.app.exception.ServiceException;
import com.jomalls.custom.app.utils.R;
import lombok.extern.slf4j.Slf4j;
......
......@@ -65,6 +65,6 @@ resilience4j.retry.configs.default.exponential-backoff-multiplier=2
# 以下异常触发重试(网络异常 + 服务端5xx错误)
resilience4j.retry.configs.default.retry-exceptions=java.util.concurrent.TimeoutException,java.io.IOException,java.net.ConnectException,org.springframework.web.reactive.function.client.WebClientResponseException
# 以下异常不触发重试(客户端4xx错误已包装为RemoteServiceException,重试无意义)
resilience4j.retry.configs.default.ignore-exceptions=com.jomalls.custom.app.exception.RemoteServiceException
resilience4j.retry.configs.default.ignore-exceptions=com.jomalls.custom.integrate.exception.RemoteServiceException
# 远程 API 重试实例使用默认配置
resilience4j.retry.instances.remoteApi.base-config=default
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment