feat: 1.0.0

修改example模块内的包路径
This commit is contained in:
byteblogs168 2023-04-21 09:08:00 +08:00
parent 850b133db9
commit a731ad70e2
25 changed files with 40 additions and 43 deletions

View File

@ -5,7 +5,7 @@ import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
@ComponentScan("com.x.retry.client.core") @ComponentScan("com.aizuda.easy.retry.client.core")
@ConditionalOnProperty(prefix = "easy-retry", name = "enabled", havingValue = "true") @ConditionalOnProperty(prefix = "easy-retry", name = "enabled", havingValue = "true")
public class XRetryClientAutoConfiguration { public class XRetryClientAutoConfiguration {

View File

@ -23,9 +23,10 @@
<fileNamePattern>log/sys.%d.%i.log</fileNamePattern> <fileNamePattern>log/sys.%d.%i.log</fileNamePattern>
<!-- 每产生一个日志文件该日志文件的保存期限为30天 --> <!-- 每产生一个日志文件该日志文件的保存期限为30天 -->
<maxHistory>30</maxHistory> <maxHistory>30</maxHistory>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- maxFileSize:这是活动文件的大小默认值是10MB,本篇设置为1KB只是为了演示 --> <!-- maxFileSize:这是活动文件的大小默认值是10MB,本篇设置为1KB只是为了演示 -->
<maxFileSize>1KB</maxFileSize> <maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy> </timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy> </rollingPolicy>
<encoder> <encoder>

View File

@ -38,7 +38,7 @@
<dependency> <dependency>
<groupId>com.aizuda</groupId> <groupId>com.aizuda</groupId>
<artifactId>easy-retry-client-starter</artifactId> <artifactId>easy-retry-client-starter</artifactId>
<version>0.0.4.2</version> <version>1.0.0.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>

View File

@ -1,6 +1,6 @@
package com.example; package com.example;
import com.x.retry.client.starter.EnableXRetry; import com.aizuda.easy.retry.client.starter.EnableXRetry;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

View File

@ -1,7 +1,7 @@
package com.example; package com.example;
import com.x.retry.client.core.plugin.RequestHeaderPlugins; import com.aizuda.easy.retry.client.core.plugin.RequestHeaderPlugins;
import com.x.retry.client.core.plugin.ResponseHeaderPlugins; import com.aizuda.easy.retry.client.core.plugin.ResponseHeaderPlugins;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpRequest; import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpRequestExecution; import org.springframework.http.client.ClientHttpRequestExecution;

View File

@ -1,6 +1,6 @@
package com.example; package com.example;
import com.x.retry.client.core.plugin.RequestHeaderPlugins; import com.aizuda.easy.retry.client.core.plugin.RequestHeaderPlugins;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import feign.RequestTemplate; import feign.RequestTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,7 +1,6 @@
package com.example.client; package com.example.client;
//import org.springframework.cloud.netflix.feign.FeignClient; import com.aizuda.easy.retry.common.core.model.Result;
import com.x.retry.common.core.model.Result;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

View File

@ -1,6 +1,6 @@
package com.example.client; package com.example.client;
import com.x.retry.client.core.plugin.ResponseHeaderPlugins; import com.aizuda.easy.retry.client.core.plugin.ResponseHeaderPlugins;
import feign.FeignException; import feign.FeignException;
import feign.Response; import feign.Response;
import feign.codec.DecodeException; import feign.codec.DecodeException;

View File

@ -1,8 +1,8 @@
package com.example.controller; package com.example.controller;
import com.x.retry.client.core.intercepter.RetrySiteSnapshot; import com.aizuda.easy.retry.client.core.intercepter.RetrySiteSnapshot;
import com.x.retry.common.core.constant.SystemConstants; import com.aizuda.easy.retry.common.core.constant.SystemConstants;
import com.x.retry.common.core.model.Result; import com.aizuda.easy.retry.common.core.model.Result;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;

View File

@ -1,8 +1,8 @@
package com.example.controller; package com.example.controller;
import com.aizuda.easy.retry.common.core.annotation.OriginalControllerReturnValue;
import com.example.demo.TestExistsTransactionalRetryService; import com.example.demo.TestExistsTransactionalRetryService;
import com.x.retry.common.core.annotation.OriginalControllerReturnValue;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,8 +1,7 @@
package com.example.controller; package com.example.controller;
import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.x.retry.client.core.annotation.Retryable; import com.aizuda.easy.retry.common.core.model.Result;
import com.x.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,7 +1,7 @@
package com.example.controller; package com.example.controller;
import com.aizuda.easy.retry.common.core.model.Result;
import com.example.client.DemoClient; import com.example.client.DemoClient;
import com.x.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,8 +1,8 @@
package com.example.controller; package com.example.controller;
import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.aizuda.easy.retry.common.core.model.Result;
import com.example.client.DemoClient; import com.example.client.DemoClient;
import com.x.retry.client.core.annotation.Retryable;
import com.x.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;

View File

@ -1,7 +1,7 @@
package com.example.demo; package com.example.demo;
import com.x.retry.client.core.strategy.RetryMethod; import com.aizuda.easy.retry.client.core.strategy.RetryMethod;
import com.x.retry.common.core.util.JsonUtil; import com.aizuda.easy.retry.common.core.util.JsonUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,6 +1,6 @@
package com.example.demo; package com.example.demo;
import com.x.retry.client.core.annotation.Retryable; import com.aizuda.easy.retry.client.core.annotation.Retryable;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -1,6 +1,6 @@
package com.example.demo; package com.example.demo;
import com.x.retry.common.core.model.Result; import com.aizuda.easy.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;

View File

@ -1,8 +1,7 @@
package com.example.demo; package com.example.demo;
import cn.hutool.core.lang.UUID; import cn.hutool.core.lang.UUID;
import com.x.retry.client.core.annotation.Retryable; import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.x.retry.client.core.retryer.RetryType;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**

View File

@ -1,11 +1,11 @@
package com.example.demo; package com.example.demo;
import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.aizuda.easy.retry.common.core.model.Result;
import com.example.mapper.SchoolMapper; import com.example.mapper.SchoolMapper;
import com.example.mapper.StudentMapper; import com.example.mapper.StudentMapper;
import com.example.po.School; import com.example.po.School;
import com.example.po.Student; import com.example.po.Student;
import com.x.retry.client.core.annotation.Retryable;
import com.x.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -1,12 +1,12 @@
package com.example.demo; package com.example.demo;
import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.aizuda.easy.retry.common.core.model.Result;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.mapper.SchoolMapper; import com.example.mapper.SchoolMapper;
import com.example.mapper.StudentMapper; import com.example.mapper.StudentMapper;
import com.example.po.School; import com.example.po.School;
import com.example.po.Student; import com.example.po.Student;
import com.x.retry.client.core.annotation.Retryable;
import com.x.retry.common.core.model.Result;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -1,10 +1,9 @@
package com.example.demo; package com.example.demo;
import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.aizuda.easy.retry.common.core.log.LogUtils;
import com.example.model.Dog; import com.example.model.Dog;
import com.example.model.Zoo; import com.example.model.Zoo;
import com.x.retry.client.core.annotation.Retryable;
import com.x.retry.client.core.retryer.RetryType;
import com.x.retry.common.core.log.LogUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,6 +1,6 @@
package com.example.demo; package com.example.demo;
import com.x.retry.client.core.annotation.Retryable; import com.aizuda.easy.retry.client.core.annotation.Retryable;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**

View File

@ -1,7 +1,7 @@
package com.example.demo; package com.example.demo;
import com.x.retry.client.core.annotation.Retryable; import com.aizuda.easy.retry.client.core.annotation.Retryable;
import com.x.retry.client.core.retryer.RetryType; import com.aizuda.easy.retry.client.core.retryer.RetryType;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**

View File

@ -1,12 +1,12 @@
package com.example; package com.example;
import com.aizuda.easy.retry.client.core.report.ReportHandler;
import com.aizuda.easy.retry.client.core.window.RetryLeapArray;
import com.aizuda.easy.retry.common.core.model.Result;
import com.aizuda.easy.retry.server.model.dto.RetryTaskDTO;
import com.example.client.DemoClient; import com.example.client.DemoClient;
import com.example.mapper.SchoolMapper; import com.example.mapper.SchoolMapper;
import com.example.po.School; import com.example.po.School;
import com.x.retry.client.core.report.ReportHandler;
import com.x.retry.client.core.window.RetryLeapArray;
import com.x.retry.common.core.model.Result;
import com.x.retry.server.model.dto.RetryTaskDTO;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -54,7 +54,7 @@ public class ExampleApplicationTests {
@SneakyThrows @SneakyThrows
@Test @Test
public void windows() { public void windows() {
for (int i = 0; i < 100000; i++) { for (int i = 0; i < 100000; i++) {
int finalI = i; int finalI = i;
new Thread(() -> { new Thread(() -> {

View File

@ -1,9 +1,9 @@
package com.example; package com.example;
import com.aizuda.easy.retry.common.core.model.Result;
import com.example.demo.RemoteService; import com.example.demo.RemoteService;
import com.example.demo.TestExistsTransactionalRetryService; import com.example.demo.TestExistsTransactionalRetryService;
import com.example.demo.TestExistsTransactionalRetryService2; import com.example.demo.TestExistsTransactionalRetryService2;
import com.x.retry.common.core.model.Result;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;

View File

@ -1,8 +1,8 @@
package com.example; package com.example;
import com.aizuda.easy.retry.common.core.model.Result;
import com.example.demo.NestMethodService; import com.example.demo.NestMethodService;
import com.example.demo.RemoteService; import com.example.demo.RemoteService;
import com.x.retry.common.core.model.Result;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.mockito.Mockito; import org.mockito.Mockito;