version: 0.0.4.2

发布正式版0.0.4.2

Signed-off-by: byteblogs168 <598092184@qq.com>
This commit is contained in:
byteblogs168 2022-10-24 21:20:32 +08:00
parent d928923d05
commit 1cdece6f5e
11 changed files with 46 additions and 65 deletions

View File

@ -38,7 +38,7 @@
<dependency>
<groupId>com.byteblogs</groupId>
<artifactId>x-retry-client-starter</artifactId>
<version>0.0.4.2-SNAPSHOT</version>
<version>0.0.4.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>

View File

@ -1,9 +1,16 @@
package com.example.controller;
import com.example.demo.TestExistsTransactionalRetryService;
import com.x.retry.common.core.annotation.OriginalControllerReturnValue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;
import java.util.UUID;
/**
* <p>
@ -13,8 +20,16 @@ import org.springframework.stereotype.Controller;
* @author www.byteblogs.com
* @since 2022-03-24
*/
@Controller
@RestController
@RequestMapping("/student")
public class StudentController {
@Autowired
private TestExistsTransactionalRetryService testExistsTransactionalRetryService;
@GetMapping("query")
@OriginalControllerReturnValue
public String get() {
return testExistsTransactionalRetryService.testSimpleInsert(UUID.randomUUID().toString());
}
}

View File

@ -38,7 +38,7 @@ public class TeacherController {
}
@GetMapping("test-status-code")
@Retryable(scene = "testStatusCode")
@Retryable(scene = "testStatusCode", isThrowException = false)
public Result testStatusCode() {
Result result = restTemplate.getForObject("http://127.0.0.1:8088/school/id", Result.class);

View File

@ -17,7 +17,7 @@ public class NestMethodService {
@Autowired
private TestExistsTransactionalRetryService testExistsTransactionalRetryService;
@Retryable(scene = "testNestMethod")
@Retryable(scene = "testNestMethod" , isThrowException = false)
@Transactional
public void testNestMethod() {
testExistsTransactionalRetryService.testSimpleInsert(UUID.randomUUID().toString());

View File

@ -39,7 +39,7 @@ public class ExistsTransactionalRetryServiceTest {
Mockito.when(remoteService.call())
.thenReturn(new Result(0, "1"))
.thenReturn(new Result(0, "2"))
.thenReturn(new Result(1, "3"))
.thenReturn(new Result(0, "3"))
.thenReturn(new Result(0, "4"))
.thenReturn(new Result(0, "5"))
;

31
pom.xml
View File

@ -21,7 +21,7 @@
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<revision>0.0.4.2-SNAPSHOT</revision>
<revision>0.0.4.2</revision>
<dingding-talk.version>1.0.0</dingding-talk.version>
<feign.version>11.7</feign.version>
<hibernate-validator.version>5.4.2.Final</hibernate-validator.version>
@ -91,15 +91,36 @@
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<url>https://github.com/byteblogs168/x-retry</url>
<connection>https://github.com/byteblogs168/x-retry.git</connection>
<developerConnection>https://github.com/byteblogs168</developerConnection>
</scm>
<developers>
<developer>
<name>byteblogs</name>
<email>byteblogs@aliyun.com</email>
<url>https://github.com/byteblogs168</url>
</developer>
</developers>
<build>
<plugins>
<plugin>

View File

@ -76,17 +76,6 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>

View File

@ -34,15 +34,4 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
</snapshotRepository>
</distributionManagement>
</project>

View File

@ -40,17 +40,6 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>

View File

@ -54,17 +54,6 @@
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>

View File

@ -39,17 +39,6 @@
</dependencies>
<distributionManagement>
<repository>
<id>rdc-releases</id>
<url>https://repo.rdc.aliyun.com/repository/69606-release-476gHC/</url>
</repository>
<snapshotRepository>
<id>rdc-snapshots</id>
<url>https://repo.rdc.aliyun.com/repository/69606-snapshot-XnE7nN/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>