@Schema type的字符串类型为string
This commit is contained in:
parent
dcc110c3e3
commit
c573769048
@ -34,7 +34,7 @@ public class LocalAndRemoteRetryController {
|
|||||||
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||||
)
|
)
|
||||||
public void remoteRetryWithLocalRemote(@Parameter(name = "params", description = "测试参数",
|
public void remoteRetryWithLocalRemote(@Parameter(name = "params", description = "测试参数",
|
||||||
schema = @Schema(type = "String", description = "测试参数", defaultValue = "test")
|
schema = @Schema(type = "string", description = "测试参数", defaultValue = "test")
|
||||||
)
|
)
|
||||||
@RequestParam("params") String params) {
|
@RequestParam("params") String params) {
|
||||||
localRemoteService.remoteRetryWithLocalRemote(params);
|
localRemoteService.remoteRetryWithLocalRemote(params);
|
||||||
|
@ -64,7 +64,7 @@ public class LocalRetryController {
|
|||||||
"下面参数可以指定:NullPointerException, ParamException"
|
"下面参数可以指定:NullPointerException, ParamException"
|
||||||
)
|
)
|
||||||
public void localRetryIncludeException(@Parameter(name = "type", description = "异常类型", in = ParameterIn.QUERY,
|
public void localRetryIncludeException(@Parameter(name = "type", description = "异常类型", in = ParameterIn.QUERY,
|
||||||
schema = @Schema(type = "String", description = "异常类型")) @RequestParam("type") String type) {
|
schema = @Schema(type = "string", description = "异常类型")) @RequestParam("type") String type) {
|
||||||
localRetryService.localRetryIncludeException(type);
|
localRetryService.localRetryIncludeException(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public class ManualRetryExecutorController {
|
|||||||
+ "📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
+ "📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||||
)
|
)
|
||||||
@GetMapping("/retry")
|
@GetMapping("/retry")
|
||||||
public void remoteRetryWithCallback(@Parameter(name = "params", description = "测试参数", schema = @Schema(description = "测试参数", defaultValue = "test"))
|
public void remoteRetryWithCallback(@Parameter(name = "params", description = "测试参数", schema = @Schema(type = "string", description = "测试参数", defaultValue = "test"))
|
||||||
@RequestParam("params") String params) {
|
@RequestParam("params") String params) {
|
||||||
manualRetryExecutorMethodService.myExecutorMethod(params);
|
manualRetryExecutorMethodService.myExecutorMethod(params);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.example.easy.retry.controller;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -42,6 +43,7 @@ public class RemoteRetryController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 一个最简单的远程调用案例
|
* 一个最简单的远程调用案例
|
||||||
|
* schema = @Schema(type = "String", defaultValue = "test", description = "测试参数", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||||
*/
|
*/
|
||||||
@GetMapping("/retry/sync")
|
@GetMapping("/retry/sync")
|
||||||
@Operation(
|
@Operation(
|
||||||
@ -50,7 +52,7 @@ public class RemoteRetryController {
|
|||||||
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
"📢查看任务列表: http://preview.easyretry.com/#/retry-task/list"
|
||||||
)
|
)
|
||||||
public void remoteSync(@Parameter(name = "params", description = "测试参数",
|
public void remoteSync(@Parameter(name = "params", description = "测试参数",
|
||||||
schema = @Schema(type = "String", defaultValue = "test", description = "测试参数"))
|
schema = @Schema(type = "string", defaultValue = "test", description = "测试参数"))
|
||||||
@RequestParam("params") String params) {
|
@RequestParam("params") String params) {
|
||||||
remoteRetryService.remoteSync(params);
|
remoteRetryService.remoteSync(params);
|
||||||
}
|
}
|
||||||
@ -86,7 +88,7 @@ public class RemoteRetryController {
|
|||||||
@GetMapping("/retryWithSingleParamIdempotentGenerate")
|
@GetMapping("/retryWithSingleParamIdempotentGenerate")
|
||||||
public void retryWithSingleParamIdempotentGenerate(
|
public void retryWithSingleParamIdempotentGenerate(
|
||||||
@Parameter(name = "params", description = "测试参数",
|
@Parameter(name = "params", description = "测试参数",
|
||||||
schema = @Schema(type = "String", description = "测试参数", defaultValue = "test"))
|
schema = @Schema(type = "string", description = "测试参数", defaultValue = "test"))
|
||||||
@RequestParam("params") String params) {
|
@RequestParam("params") String params) {
|
||||||
remoteRetryService.retryWithSingleParamIdempotentGenerate(params);
|
remoteRetryService.retryWithSingleParamIdempotentGenerate(params);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user