feat: 1.0.0
从x-retry迁移项目到easy-retry
This commit is contained in:
parent
44bd2dc1ae
commit
b60f19541e
32
README.md
32
README.md
@ -1,7 +1,7 @@
|
||||
## 《分布式异常重试服务平台 X-RETRY》
|
||||
## 《分布式异常重试服务平台 easy-retry》
|
||||
|
||||
# 简介
|
||||
> X-RETRY 基于服务治理的思想我们开发了重试治理的功能,支持动态配置,接入方式基本无需入侵业务代码,并使用多种策略结合的方式在链路层面控制重试放大效应,兼顾易用性、灵活性、安全性的分布式异常重试服务平台
|
||||
> easy-retry 基于服务治理的思想我们开发了重试治理的功能,支持动态配置,接入方式基本无需入侵业务代码,并使用多种策略结合的方式在链路层面控制重试放大效应,兼顾易用性、灵活性、安全性的分布式异常重试服务平台
|
||||
|
||||
# 后端管理系统预览
|
||||
地址: <http://x-retry.byteblogs.com>
|
||||
@ -29,14 +29,14 @@
|
||||
## 添加依赖
|
||||
```java
|
||||
<dependency>
|
||||
<groupId>com.x.retry</groupId>
|
||||
<artifactId>x-retry-client-starter</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-starter</artifactId>
|
||||
<version>最新版本</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## 配置
|
||||
添加注解开启X-RETRY功能
|
||||
添加注解开启easy-retry功能
|
||||
```java
|
||||
@SpringBootApplication
|
||||
@EnableXRetry(group = "example_group")
|
||||
@ -87,7 +87,7 @@ doc/sql/x_retry.sql
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
name: x_retry
|
||||
name: easy_retry
|
||||
url: jdbc:mysql://localhost:3306/x_retry?useSSL=false&characterEncoding=utf8&useUnicode=true
|
||||
username: root
|
||||
password: root
|
||||
@ -99,7 +99,7 @@ spring:
|
||||
maximum-pool-size: 20
|
||||
auto-commit: true
|
||||
idle-timeout: 30000
|
||||
pool-name: x_retry
|
||||
pool-name: easy_retry
|
||||
max-lifetime: 1800000
|
||||
connection-test-query: SELECT 1
|
||||
resources:
|
||||
@ -116,7 +116,7 @@ mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: true
|
||||
x-retry:
|
||||
easy-retry:
|
||||
lastDays: 30 # 拉取重试数据的天数
|
||||
retryPullPageSize: 100 # 拉取重试数据的每批次的大小
|
||||
nettyPort: 1788 # 服务端netty端口
|
||||
@ -128,7 +128,7 @@ x-retry:
|
||||
### 下载源码部署
|
||||
- 下载源码
|
||||
```
|
||||
https://github.com/byteblogs168/x-retry.git
|
||||
https://github.com/byteblogs168/easy-retry.git
|
||||
```
|
||||
|
||||
- maven 打包镜像
|
||||
@ -138,19 +138,19 @@ maven clean install
|
||||
|
||||
- 修改配置
|
||||
```
|
||||
/x-retry-server/src/main/resources/application.yml
|
||||
/easy-retry-server/src/main/resources/application.yml
|
||||
```
|
||||
|
||||
- 启动
|
||||
```
|
||||
java -jar x-retry-server.jar
|
||||
java -jar easy-retry-server.jar
|
||||
```
|
||||
|
||||
### docker 部署
|
||||
- 下载镜像
|
||||
地址: https://github.com/byteblogs168/x-retry/pkgs/container/x-retry-server
|
||||
地址: https://github.com/byteblogs168/easy-retry/pkgs/container/easy-retry-server
|
||||
```
|
||||
docker pull ghcr.io/byteblogs168/x-retry-server:{最新版本}
|
||||
docker pull ghcr.io/byteblogs168/easy-retry-server:{最新版本}
|
||||
```
|
||||
|
||||
- 创建容器并运行
|
||||
@ -158,15 +158,15 @@ java -jar x-retry-server.jar
|
||||
```
|
||||
/**
|
||||
* 如需自定义 mysql 等配置,可通过 "-e PARAMS" 指定,参数格式 PARAMS="--key1=value1 --key2=value2" ;
|
||||
* 配置项参考文件:/x-retry-server/src/main/resources/application.yml
|
||||
* 配置项参考文件:/easy-retry-server/src/main/resources/application.yml
|
||||
* 如需自定义 JVM内存参数 等配置,可通过 "-e JAVA_OPTS" 指定,参数格式 JAVA_OPTS="-Xmx512m" ;
|
||||
*/
|
||||
docker run \
|
||||
-e PARAMS="--spring.datasource.username=root --spring.datasource.password=123456 --spring.datasource.url=jdbc:mysql://ip:3306/x_retry?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai " \
|
||||
-p 8080:8080 \
|
||||
-p 1788:1788 \
|
||||
--name x-retry-server-1 \
|
||||
-d registry.cn-shanghai.aliyuncs.com/byteblogs/x-retry:{最新版本}
|
||||
--name easy-retry-server-1 \
|
||||
-d registry.cn-shanghai.aliyuncs.com/byteblogs/easy-retry:{最新版本}
|
||||
|
||||
```
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>x-retry-client-core</artifactId>
|
||||
<name>x-retry-client-core</name>
|
||||
<description>x-retry-client-core</description>
|
||||
<artifactId>easy-retry-client-core</artifactId>
|
||||
<name>easy-retry-client-core</name>
|
||||
<description>easy-retry-client-core</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
@ -54,8 +54,8 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common-core</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.caucho</groupId>
|
||||
@ -67,12 +67,12 @@
|
||||
<artifactId>netty-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common-server-api</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common-server-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common-client-api</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common-client-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.server.support;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
/**
|
||||
* 组件生命周期
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.client.core;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
import com.github.rholder.retry.Retryer;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.function.Consumer;
|
@ -1,8 +1,7 @@
|
||||
package com.x.retry.client.core;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
import com.github.rholder.retry.RetryListener;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core;
|
||||
package com.aizuda.easy.retry.client.core;
|
||||
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.x.retry.client.core.annotation;
|
||||
package com.aizuda.easy.retry.client.core.annotation;
|
||||
|
||||
|
||||
import com.x.retry.client.core.BizIdGenerate;
|
||||
import com.x.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.x.retry.client.core.callback.SimpleRetryCompleteCallback;
|
||||
import com.x.retry.client.core.generator.SimpleBizIdGenerate;
|
||||
import com.x.retry.client.core.retryer.RetryType;
|
||||
import com.x.retry.client.core.strategy.RetryAnnotationMethod;
|
||||
import com.x.retry.client.core.strategy.RetryMethod;
|
||||
import com.aizuda.easy.retry.client.core.BizIdGenerate;
|
||||
import com.aizuda.easy.retry.client.core.generator.SimpleBizIdGenerate;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryAnnotationMethod;
|
||||
import com.aizuda.easy.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.aizuda.easy.retry.client.core.callback.SimpleRetryCompleteCallback;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryType;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryMethod;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
@ -1,14 +1,14 @@
|
||||
package com.x.retry.client.core.cache;
|
||||
package com.aizuda.easy.retry.client.core.cache;
|
||||
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.x.retry.client.core.client.NettyHttpConnectClient;
|
||||
import com.x.retry.client.core.client.request.ConfigHttpRequestHandler;
|
||||
import com.x.retry.client.core.client.request.RequestParam;
|
||||
import com.x.retry.client.core.client.response.XRetryResponse;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.server.model.dto.ConfigDTO;
|
||||
import com.aizuda.easy.retry.client.core.client.request.ConfigHttpRequestHandler;
|
||||
import com.aizuda.easy.retry.client.core.client.request.RequestParam;
|
||||
import com.aizuda.easy.retry.client.core.client.response.XRetryResponse;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.client.core.client.NettyHttpConnectClient;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.server.model.dto.ConfigDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,9 +1,8 @@
|
||||
package com.x.retry.client.core.cache;
|
||||
package com.aizuda.easy.retry.client.core.cache;
|
||||
|
||||
import com.google.common.collect.HashBasedTable;
|
||||
import com.google.common.collect.Table;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.callback;
|
||||
package com.aizuda.easy.retry.client.core.callback;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.callback;
|
||||
package com.aizuda.easy.retry.client.core.callback;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,15 +1,15 @@
|
||||
package com.x.retry.client.core.client;
|
||||
package com.aizuda.easy.retry.client.core.client;
|
||||
|
||||
import com.x.retry.client.core.client.request.BeatHttpRequestHandler;
|
||||
import com.x.retry.client.core.client.request.RequestParam;
|
||||
import com.x.retry.client.core.client.response.XRetryResponse;
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.util.HostUtils;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.client.core.client.request.BeatHttpRequestHandler;
|
||||
import com.aizuda.easy.retry.client.core.client.response.XRetryResponse;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import com.aizuda.easy.retry.client.core.client.request.RequestParam;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.util.HostUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import io.netty.handler.codec.http.FullHttpResponse;
|
||||
@ -95,7 +95,7 @@ public class NettyHttpClientHandler extends SimpleChannelInboundHandler<FullHttp
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
LogUtils.error(log,"x-retry netty_http client exception", cause);
|
||||
LogUtils.error(log,"easy-retry netty_http client exception", cause);
|
||||
super.exceptionCaught(ctx, cause);
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.x.retry.client.core.client;
|
||||
package com.aizuda.easy.retry.client.core.client;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.x.retry.client.core.cache.GroupVersionCache;
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.enums.HeadersEnum;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.util.HostUtils;
|
||||
import com.aizuda.easy.retry.client.core.cache.GroupVersionCache;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.enums.HeadersEnum;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.HostUtils;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.*;
|
@ -1,28 +1,31 @@
|
||||
package com.x.retry.client.core.client;
|
||||
package com.aizuda.easy.retry.client.core.client;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryArgSerializer;
|
||||
import com.aizuda.easy.retry.client.core.cache.GroupVersionCache;
|
||||
import com.aizuda.easy.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.aizuda.easy.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.aizuda.easy.retry.client.core.serializer.JacksonSerializer;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryStrategy;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.model.Result;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.server.model.dto.ConfigDTO;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.x.retry.client.core.RetryArgSerializer;
|
||||
import com.x.retry.client.core.cache.GroupVersionCache;
|
||||
import com.x.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.x.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.x.retry.client.core.serializer.JacksonSerializer;
|
||||
import com.x.retry.client.core.strategy.RetryStrategy;
|
||||
import com.x.retry.client.model.DispatchRetryDTO;
|
||||
import com.x.retry.client.model.DispatchRetryResultDTO;
|
||||
import com.x.retry.client.model.RetryCallbackDTO;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.x.retry.common.core.enums.RetryStatusEnum;
|
||||
import com.x.retry.common.core.model.Result;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.x.retry.server.model.dto.ConfigDTO;
|
||||
import com.aizuda.easy.retry.client.model.DispatchRetryDTO;
|
||||
import com.aizuda.easy.retry.client.model.DispatchRetryResultDTO;
|
||||
import com.aizuda.easy.retry.client.model.RetryCallbackDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Objects;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.net.url.UrlQuery;
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import io.netty.handler.codec.http.HttpMethod;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,13 +1,13 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.net.url.UrlQuery;
|
||||
import com.x.retry.client.core.cache.GroupVersionCache;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.x.retry.server.model.dto.ConfigDTO;
|
||||
import com.aizuda.easy.retry.client.core.cache.GroupVersionCache;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.server.model.dto.ConfigDTO;
|
||||
import io.netty.handler.codec.http.HttpMethod;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import io.netty.handler.codec.http.HttpMethod;
|
||||
|
||||
import java.util.function.Consumer;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,11 +1,11 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
import cn.hutool.core.net.url.UrlBuilder;
|
||||
import cn.hutool.core.net.url.UrlQuery;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import io.netty.handler.codec.http.HttpMethod;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.client.request;
|
||||
package com.aizuda.easy.retry.client.core.client.request;
|
||||
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.client.response;
|
||||
package com.aizuda.easy.retry.client.core.client.response;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
@ -1,8 +1,8 @@
|
||||
package com.x.retry.client.core.client.response;
|
||||
package com.aizuda.easy.retry.client.core.client.response;
|
||||
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.model.NettyResult;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.model.NettyResult;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Objects;
|
@ -1,11 +1,10 @@
|
||||
package com.x.retry.client.core.config;
|
||||
package com.aizuda.easy.retry.client.core.config;
|
||||
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Objects;
|
||||
@ -15,7 +14,7 @@ import java.util.Objects;
|
||||
* @date : 2022-03-04 15:53
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "x-retry")
|
||||
@ConfigurationProperties(prefix = "easy-retry")
|
||||
@Getter
|
||||
@Setter
|
||||
public class XRetryProperties {
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.event;
|
||||
package com.aizuda.easy.retry.client.core.event;
|
||||
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.event;
|
||||
package com.aizuda.easy.retry.client.core.event;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.exception;
|
||||
package com.aizuda.easy.retry.client.core.exception;
|
||||
|
||||
import com.x.retry.common.core.exception.BaseXRetryException;
|
||||
import com.aizuda.easy.retry.common.core.exception.BaseXRetryException;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,16 +1,13 @@
|
||||
package com.x.retry.client.core.executor;
|
||||
package com.aizuda.easy.retry.client.core.executor;
|
||||
|
||||
import com.x.retry.client.core.RetryExecutor;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.strategy.RetryAnnotationMethod;
|
||||
import com.x.retry.client.core.strategy.RetryMethod;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryAnnotationMethod;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryMethod;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,9 +1,9 @@
|
||||
package com.x.retry.client.core.executor;
|
||||
package com.aizuda.easy.retry.client.core.executor;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutorParameter;
|
||||
import com.aizuda.easy.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.github.rholder.retry.*;
|
||||
import com.x.retry.client.core.RetryExecutorParameter;
|
||||
import com.x.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.concurrent.Callable;
|
@ -1,8 +1,8 @@
|
||||
package com.x.retry.client.core.generator;
|
||||
package com.aizuda.easy.retry.client.core.generator;
|
||||
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import com.x.retry.client.core.BizIdGenerate;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.client.core.BizIdGenerate;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.init;
|
||||
package com.aizuda.easy.retry.client.core.init;
|
||||
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
@ -24,8 +24,8 @@ public class EndListener implements ApplicationListener<ContextClosedEvent> {
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextClosedEvent event) {
|
||||
log.info("X-RETRY-CLIENT 关闭");
|
||||
log.info("easy-retry-CLIENT 关闭");
|
||||
lifecycleList.forEach(Lifecycle::close);
|
||||
log.info("X-RETRY-CLIENT 关闭成功");
|
||||
log.info("easy-retry-CLIENT 关闭成功");
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.init;
|
||||
package com.aizuda.easy.retry.client.core.init;
|
||||
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
@ -24,8 +24,8 @@ public class StartListener implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
log.info("X-RETRY-CLIENT-RETRY 启动");
|
||||
log.info("easy-retry-CLIENT-RETRY 启动");
|
||||
lifecycleList.forEach(Lifecycle::start);
|
||||
log.info("X-RETRY-CLIENT-RETRY 启动成功");
|
||||
log.info("easy-retry-CLIENT-RETRY 启动成功");
|
||||
}
|
||||
}
|
@ -1,16 +1,13 @@
|
||||
package com.x.retry.client.core.intercepter;
|
||||
package com.aizuda.easy.retry.client.core.intercepter;
|
||||
|
||||
import com.x.retry.common.core.constant.SystemConstants;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.XRetryHeaders;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryHeaders;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
@ -36,7 +33,7 @@ public class HeaderAspect {
|
||||
// 标记进入方法的时间
|
||||
RetrySiteSnapshot.setEntryMethodTime(System.currentTimeMillis());
|
||||
|
||||
LogUtils.info(log, "x-retry 拦截器 xRetry:[{}]", xRetry);
|
||||
LogUtils.info(log, "easy-retry 拦截器 xRetry:[{}]", xRetry);
|
||||
RetrySiteSnapshot.setRetryHeader(JsonUtil.parseObject(xRetry, XRetryHeaders.class));
|
||||
}
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
package com.x.retry.client.core.intercepter;
|
||||
package com.aizuda.easy.retry.client.core.intercepter;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.x.retry.client.core.annotation.Retryable;
|
||||
import com.x.retry.client.core.cache.GroupVersionCache;
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.x.retry.client.core.strategy.RetryStrategy;
|
||||
import com.x.retry.common.core.alarm.Alarm;
|
||||
import com.x.retry.common.core.alarm.AlarmContext;
|
||||
import com.x.retry.common.core.alarm.AltinAlarmFactory;
|
||||
import com.x.retry.common.core.enums.NotifySceneEnum;
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.util.EnvironmentUtils;
|
||||
import com.x.retry.server.model.dto.ConfigDTO;
|
||||
import com.aizuda.easy.retry.client.core.cache.GroupVersionCache;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryStrategy;
|
||||
import com.aizuda.easy.retry.client.core.annotation.Retryable;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.aizuda.easy.retry.common.core.alarm.Alarm;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AlarmContext;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AltinAlarmFactory;
|
||||
import com.aizuda.easy.retry.common.core.enums.NotifySceneEnum;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.EnvironmentUtils;
|
||||
import com.aizuda.easy.retry.server.model.dto.ConfigDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.core.PriorityOrdered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDateTime;
|
||||
@ -57,7 +56,7 @@ public class RetryAspect {
|
||||
@Autowired
|
||||
private AltinAlarmFactory altinAlarmFactory;
|
||||
|
||||
@Around("@annotation(com.x.retry.client.core.annotation.Retryable)")
|
||||
@Around("@annotation(com.aizuda.easy.retry.client.core.annotation.Retryable)")
|
||||
public Object around(ProceedingJoinPoint point) throws Throwable {
|
||||
String traceId = UUID.randomUUID().toString();
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.client.core.intercepter;
|
||||
package com.aizuda.easy.retry.client.core.intercepter;
|
||||
|
||||
import com.x.retry.common.core.constant.SystemConstants;
|
||||
import com.x.retry.common.core.model.XRetryHeaders;
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryHeaders;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
@ -1,11 +1,11 @@
|
||||
package com.x.retry.client.core.plugin;
|
||||
package com.aizuda.easy.retry.client.core.plugin;
|
||||
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.common.core.constant.SystemConstants;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.XRetryHeaders;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryHeaders;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.HashMap;
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.client.core.plugin;
|
||||
package com.aizuda.easy.retry.client.core.plugin;
|
||||
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.client.core.register;
|
||||
package com.aizuda.easy.retry.client.core.register;
|
||||
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.x.retry.client.core.Scanner;
|
||||
import com.x.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.client.core.Scanner;
|
||||
import com.aizuda.easy.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -1,14 +1,13 @@
|
||||
package com.x.retry.client.core.register.scan;
|
||||
package com.aizuda.easy.retry.client.core.register.scan;
|
||||
|
||||
import com.x.retry.client.core.BizIdGenerate;
|
||||
import com.x.retry.client.core.annotation.Retryable;
|
||||
import com.x.retry.client.core.Scanner;
|
||||
import com.x.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.x.retry.client.core.retryer.RetryType;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.strategy.RetryMethod;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.client.core.BizIdGenerate;
|
||||
import com.aizuda.easy.retry.client.core.Scanner;
|
||||
import com.aizuda.easy.retry.client.core.annotation.Retryable;
|
||||
import com.aizuda.easy.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryType;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryMethod;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.aop.support.AopUtils;
|
||||
import org.springframework.beans.BeansException;
|
@ -1,18 +1,17 @@
|
||||
package com.x.retry.client.core.report;
|
||||
package com.aizuda.easy.retry.client.core.report;
|
||||
|
||||
import com.x.retry.client.core.BizIdGenerate;
|
||||
import com.x.retry.client.core.Lifecycle;
|
||||
import com.x.retry.client.core.RetryArgSerializer;
|
||||
import com.x.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.spel.SPELParamFunction;
|
||||
import com.x.retry.client.core.window.RetryLeapArray;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.window.WindowWrap;
|
||||
import com.x.retry.server.model.dto.RetryTaskDTO;
|
||||
import com.aizuda.easy.retry.client.core.BizIdGenerate;
|
||||
import com.aizuda.easy.retry.client.core.RetryArgSerializer;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.client.core.cache.RetryerInfoCache;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.spel.SPELParamFunction;
|
||||
import com.aizuda.easy.retry.client.core.window.RetryLeapArray;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.server.model.dto.RetryTaskDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
@ -20,7 +19,6 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
@ -1,28 +1,28 @@
|
||||
package com.x.retry.client.core.report;
|
||||
package com.aizuda.easy.retry.client.core.report;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutorParameter;
|
||||
import com.aizuda.easy.retry.client.core.client.response.XRetryResponse;
|
||||
import com.aizuda.easy.retry.client.core.config.XRetryProperties;
|
||||
import com.github.rholder.retry.*;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.x.retry.client.core.RetryExecutor;
|
||||
import com.x.retry.client.core.RetryExecutorParameter;
|
||||
import com.x.retry.client.core.cache.GroupVersionCache;
|
||||
import com.x.retry.client.core.client.NettyHttpConnectClient;
|
||||
import com.x.retry.client.core.client.request.ReportRetryInfoHttpRequestHandler;
|
||||
import com.x.retry.client.core.client.request.RequestParam;
|
||||
import com.x.retry.client.core.client.response.XRetryResponse;
|
||||
import com.x.retry.client.core.config.XRetryProperties;
|
||||
import com.x.retry.client.core.executor.GuavaRetryExecutor;
|
||||
import com.x.retry.common.core.alarm.Alarm;
|
||||
import com.x.retry.common.core.alarm.AlarmContext;
|
||||
import com.x.retry.common.core.alarm.AltinAlarmFactory;
|
||||
import com.x.retry.common.core.context.SpringContext;
|
||||
import com.x.retry.common.core.enums.NotifySceneEnum;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.model.XRetryRequest;
|
||||
import com.x.retry.common.core.util.EnvironmentUtils;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.x.retry.common.core.window.Listener;
|
||||
import com.x.retry.server.model.dto.ConfigDTO;
|
||||
import com.x.retry.server.model.dto.RetryTaskDTO;
|
||||
import com.aizuda.easy.retry.client.core.cache.GroupVersionCache;
|
||||
import com.aizuda.easy.retry.client.core.client.NettyHttpConnectClient;
|
||||
import com.aizuda.easy.retry.client.core.client.request.ReportRetryInfoHttpRequestHandler;
|
||||
import com.aizuda.easy.retry.client.core.client.request.RequestParam;
|
||||
import com.aizuda.easy.retry.client.core.executor.GuavaRetryExecutor;
|
||||
import com.aizuda.easy.retry.common.core.alarm.Alarm;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AlarmContext;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AltinAlarmFactory;
|
||||
import com.aizuda.easy.retry.common.core.context.SpringContext;
|
||||
import com.aizuda.easy.retry.common.core.enums.NotifySceneEnum;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.model.XRetryRequest;
|
||||
import com.aizuda.easy.retry.common.core.util.EnvironmentUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.window.Listener;
|
||||
import com.aizuda.easy.retry.server.model.dto.ConfigDTO;
|
||||
import com.aizuda.easy.retry.server.model.dto.RetryTaskDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -96,11 +96,11 @@ public class ReportListener implements Listener<RetryTaskDTO> {
|
||||
@Override
|
||||
public <V> void onRetry(Attempt<V> attempt) {
|
||||
if (attempt.hasResult()) {
|
||||
LogUtils.error(log,"x-retry 上报成功,第[{}]次调度", attempt.getAttemptNumber());
|
||||
LogUtils.error(log,"easy-retry 上报成功,第[{}]次调度", attempt.getAttemptNumber());
|
||||
}
|
||||
|
||||
if (attempt.hasException()) {
|
||||
LogUtils.error(log,"x-retry 上报失败,第[{}]次调度 ", attempt.getAttemptNumber(), attempt.getExceptionCause());
|
||||
LogUtils.error(log,"easy-retry 上报失败,第[{}]次调度 ", attempt.getAttemptNumber(), attempt.getExceptionCause());
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.retryer;
|
||||
package com.aizuda.easy.retry.client.core.retryer;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,8 +1,8 @@
|
||||
package com.x.retry.client.core.retryer;
|
||||
package com.aizuda.easy.retry.client.core.retryer;
|
||||
|
||||
import com.x.retry.client.core.BizIdGenerate;
|
||||
import com.x.retry.client.core.callback.RetryCompleteCallback;
|
||||
import com.x.retry.client.core.strategy.RetryMethod;
|
||||
import com.aizuda.easy.retry.client.core.BizIdGenerate;
|
||||
import com.aizuda.easy.retry.client.core.strategy.RetryMethod;
|
||||
import com.aizuda.easy.retry.client.core.callback.RetryCompleteCallback;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.client.core.retryer;
|
||||
package com.aizuda.easy.retry.client.core.retryer;
|
||||
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
@ -1,9 +1,9 @@
|
||||
package com.x.retry.client.core.serializer;
|
||||
package com.aizuda.easy.retry.client.core.serializer;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryArgSerializer;
|
||||
import com.caucho.hessian.io.HessianInput;
|
||||
import com.caucho.hessian.io.HessianOutput;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.x.retry.client.core.RetryArgSerializer;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.client.core.serializer;
|
||||
package com.aizuda.easy.retry.client.core.serializer;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryArgSerializer;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.x.retry.client.core.RetryArgSerializer;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.lang.reflect.Method;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.spel;
|
||||
package com.aizuda.easy.retry.client.core.spel;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
@ -1,16 +1,15 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutorParameter;
|
||||
import com.aizuda.easy.retry.client.core.event.XRetryListener;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.github.rholder.retry.Retryer;
|
||||
import com.github.rholder.retry.StopStrategy;
|
||||
import com.github.rholder.retry.WaitStrategy;
|
||||
import com.x.retry.client.core.event.XRetryListener;
|
||||
import com.x.retry.client.core.executor.GuavaRetryExecutor;
|
||||
import com.x.retry.client.core.RetryExecutor;
|
||||
import com.x.retry.client.core.RetryExecutorParameter;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.client.core.executor.GuavaRetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
@ -1,17 +1,17 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutorParameter;
|
||||
import com.aizuda.easy.retry.client.core.exception.XRetryClientException;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.aizuda.easy.retry.client.core.report.ReportHandler;
|
||||
import com.github.rholder.retry.*;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.x.retry.client.core.RetryExecutor;
|
||||
import com.x.retry.client.core.RetryExecutorParameter;
|
||||
import com.x.retry.client.core.exception.XRetryClientException;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.client.core.report.ReportHandler;
|
||||
import com.x.retry.client.core.retryer.RetryType;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryType;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -170,7 +170,7 @@ public class LocalRetryStrategies extends AbstractRetryStrategies {
|
||||
return Collections.singletonList(new RetryListener() {
|
||||
@Override
|
||||
public <V> void onRetry(Attempt<V> attempt) {
|
||||
LogUtils.error(log,"x-retry 本地重试,第[{}]次调度", attempt.getAttemptNumber());
|
||||
LogUtils.error(log,"easy-retry 本地重试,第[{}]次调度", attempt.getAttemptNumber());
|
||||
}
|
||||
});
|
||||
}
|
@ -1,15 +1,15 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutor;
|
||||
import com.aizuda.easy.retry.client.core.RetryExecutorParameter;
|
||||
import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.github.rholder.retry.*;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.x.retry.client.core.RetryExecutor;
|
||||
import com.x.retry.client.core.RetryExecutorParameter;
|
||||
import com.x.retry.client.core.intercepter.RetrySiteSnapshot;
|
||||
import com.x.retry.client.core.retryer.RetryType;
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.x.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryType;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.aizuda.easy.retry.common.core.enums.RetryResultStatusEnum;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@ -106,11 +106,11 @@ public class RemoteRetryStrategies extends AbstractRetryStrategies {
|
||||
@Override
|
||||
public <V> void onRetry(Attempt<V> attempt) {
|
||||
if (attempt.hasResult()) {
|
||||
LogUtils.error(log, "x-retry 远程重试成功,第[{}]次调度", attempt.getAttemptNumber());
|
||||
LogUtils.error(log, "easy-retry 远程重试成功,第[{}]次调度", attempt.getAttemptNumber());
|
||||
}
|
||||
|
||||
if (attempt.hasException()) {
|
||||
LogUtils.error(log, "x-retry 远程重试失败,第[{}]次调度 ", attempt.getAttemptNumber(), attempt.getExceptionCause());
|
||||
LogUtils.error(log, "easy-retry 远程重试失败,第[{}]次调度 ", attempt.getAttemptNumber(), attempt.getExceptionCause());
|
||||
}
|
||||
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
import com.x.retry.client.core.retryer.RetryerInfo;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerInfo;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.client.core.strategy;
|
||||
package com.aizuda.easy.retry.client.core.strategy;
|
||||
|
||||
import com.x.retry.client.core.retryer.RetryType;
|
||||
import com.x.retry.client.core.retryer.RetryerResultContext;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryType;
|
||||
import com.aizuda.easy.retry.client.core.retryer.RetryerResultContext;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.client.core.window;
|
||||
package com.aizuda.easy.retry.client.core.window;
|
||||
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.x.retry.common.core.window.LeapArray;
|
||||
import com.x.retry.common.core.window.Listener;
|
||||
import com.x.retry.common.core.window.WindowWrap;
|
||||
import com.x.retry.server.model.dto.RetryTaskDTO;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.window.LeapArray;
|
||||
import com.aizuda.easy.retry.common.core.window.Listener;
|
||||
import com.aizuda.easy.retry.common.core.window.WindowWrap;
|
||||
import com.aizuda.easy.retry.server.model.dto.RetryTaskDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
@ -1,9 +1,5 @@
|
||||
package com.x.retry.common.client.core.xretryclientcore;
|
||||
|
||||
import com.x.retry.client.core.window.RetryLeapArray;
|
||||
import com.x.retry.server.model.dto.RetryTaskDTO;
|
||||
import lombok.SneakyThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
@ -3,15 +3,15 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>x-retry-client-starter</artifactId>
|
||||
<name>x-retry-client-starter</name>
|
||||
<description>x-retry-client-starter</description>
|
||||
<artifactId>easy-retry-client-starter</artifactId>
|
||||
<name>easy-retry-client-starter</name>
|
||||
<description>easy-retry-client-starter</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
@ -29,8 +29,8 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-client-core</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-client-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.starter;
|
||||
package com.aizuda.easy.retry.client.starter;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.starter;
|
||||
package com.aizuda.easy.retry.client.starter;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("com.x.retry.client.core")
|
||||
@ConditionalOnProperty(prefix = "x-retry", name = "enabled", havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "easy-retry", name = "enabled", havingValue = "true")
|
||||
public class XRetryClientAutoConfiguration {
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.starter;
|
||||
package com.aizuda.easy.retry.client.starter;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
import org.springframework.context.EnvironmentAware;
|
||||
@ -21,7 +21,7 @@ public class XRetryClientsRegistrar implements ImportBeanDefinitionRegistrar, En
|
||||
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
|
||||
Map<String, Object> attrs = importingClassMetadata.getAnnotationAttributes(EnableXRetry.class.getName());
|
||||
Map<String, Object> systemEnvironment = standardEnvironment.getSystemProperties();
|
||||
systemEnvironment.put("x-retry.group", (String) attrs.get("group"));
|
||||
systemEnvironment.put("easy-retry.group", (String) attrs.get("group"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -29,6 +29,6 @@ public class XRetryClientsRegistrar implements ImportBeanDefinitionRegistrar, En
|
||||
StandardEnvironment standardEnvironment = (StandardEnvironment) environment;
|
||||
this.standardEnvironment = standardEnvironment;
|
||||
Map<String, Object> systemEnvironment = standardEnvironment.getSystemProperties();
|
||||
systemEnvironment.put("x-retry.enabled", true);
|
||||
systemEnvironment.put("easy-retry.enabled", true);
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
com.aizuda.easy.retry.client.starter.XRetryClientAutoConfiguration
|
@ -3,15 +3,15 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>x-retry-common-client-api</artifactId>
|
||||
<name>x-retry-common-client-api</name>
|
||||
<description>x-retry-common-client-api</description>
|
||||
<artifactId>easy-retry-common-client-api</artifactId>
|
||||
<name>easy-retry-common-client-api</name>
|
||||
<description>easy-retry-common-client-api</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
@ -31,8 +31,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common-core</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.model;
|
||||
package com.aizuda.easy.retry.client.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.model;
|
||||
package com.aizuda.easy.retry.client.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.client.model;
|
||||
package com.aizuda.easy.retry.client.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
@ -3,15 +3,15 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.byteblogs</groupId>
|
||||
<artifactId>x-retry-common</artifactId>
|
||||
<groupId>com.aizuda</groupId>
|
||||
<artifactId>easy-retry-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>x-retry-common-core</artifactId>
|
||||
<name>x-retry-common-core</name>
|
||||
<description>x-retry-common-core</description>
|
||||
<artifactId>easy-retry-common-core</artifactId>
|
||||
<name>easy-retry-common-core</name>
|
||||
<description>easy-retry-common-core</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core;
|
||||
package com.aizuda.easy.retry.common.core;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.alarm;
|
||||
package com.aizuda.easy.retry.common.core.alarm;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.alarm;
|
||||
package com.aizuda.easy.retry.common.core.alarm;
|
||||
|
||||
import lombok.Data;
|
||||
import org.slf4j.helpers.MessageFormatter;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.alarm;
|
||||
package com.aizuda.easy.retry.common.core.alarm;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.alarm;
|
||||
package com.aizuda.easy.retry.common.core.alarm;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.x.retry.common.core.alarm;
|
||||
package com.aizuda.easy.retry.common.core.alarm;
|
||||
|
||||
import cn.hutool.extra.mail.MailAccount;
|
||||
import com.x.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.common.core.alarm.strategy;
|
||||
package com.aizuda.easy.retry.common.core.alarm.strategy;
|
||||
|
||||
import com.x.retry.common.core.alarm.Alarm;
|
||||
import com.aizuda.easy.retry.common.core.alarm.Alarm;
|
||||
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.common.core.alarm.strategy;
|
||||
package com.aizuda.easy.retry.common.core.alarm.strategy;
|
||||
|
||||
import com.x.retry.common.core.alarm.AlarmContext;
|
||||
import com.x.retry.common.core.alarm.DingDingAttribute;
|
||||
import com.x.retry.common.core.enums.AlarmTypeEnum;
|
||||
import com.x.retry.common.core.util.DingDingUtils;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.enums.AlarmTypeEnum;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AlarmContext;
|
||||
import com.aizuda.easy.retry.common.core.alarm.DingDingAttribute;
|
||||
import com.aizuda.easy.retry.common.core.util.DingDingUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
@ -1,10 +1,10 @@
|
||||
package com.x.retry.common.core.alarm.strategy;
|
||||
package com.aizuda.easy.retry.common.core.alarm.strategy;
|
||||
|
||||
import cn.hutool.extra.mail.MailUtil;
|
||||
import com.x.retry.common.core.alarm.AlarmContext;
|
||||
import com.x.retry.common.core.alarm.EmailAttribute;
|
||||
import com.x.retry.common.core.enums.AlarmTypeEnum;
|
||||
import com.x.retry.common.core.util.JsonUtil;
|
||||
import com.aizuda.easy.retry.common.core.alarm.EmailAttribute;
|
||||
import com.aizuda.easy.retry.common.core.enums.AlarmTypeEnum;
|
||||
import com.aizuda.easy.retry.common.core.alarm.AlarmContext;
|
||||
import com.aizuda.easy.retry.common.core.util.JsonUtil;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.annotation;
|
||||
package com.aizuda.easy.retry.common.core.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.constant;
|
||||
package com.aizuda.easy.retry.common.core.constant;
|
||||
|
||||
/**
|
||||
* @author: www.byteblogs.com
|
||||
@ -9,12 +9,12 @@ public class SystemConstants {
|
||||
/**
|
||||
* 请求头 key
|
||||
*/
|
||||
public static final String X_RETRY_HEAD_KEY = "x-retry";
|
||||
public static final String X_RETRY_HEAD_KEY = "easy-retry";
|
||||
|
||||
/**
|
||||
* 异常重试码 key
|
||||
*/
|
||||
public static final String X_RETRY_STATUS_CODE_KEY = "x-retry-status";
|
||||
public static final String X_RETRY_STATUS_CODE_KEY = "easy-retry-status";
|
||||
|
||||
/**
|
||||
* 异常重试码
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.context;
|
||||
package com.aizuda.easy.retry.common.core.context;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeansException;
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.common.core.covert;
|
||||
package com.aizuda.easy.retry.common.core.covert;
|
||||
|
||||
import com.x.retry.common.core.exception.XRetryCommonException;
|
||||
import com.aizuda.easy.retry.common.core.exception.XRetryCommonException;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.covert;
|
||||
package com.aizuda.easy.retry.common.core.covert;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
/**
|
||||
* 预警类型
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import com.x.retry.common.core.exception.XRetryCommonException;
|
||||
import com.aizuda.easy.retry.common.core.exception.XRetryCommonException;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.lang.NonNull;
|
@ -1,4 +1,4 @@
|
||||
package com.x.retry.common.core.enums;
|
||||
package com.aizuda.easy.retry.common.core.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user