类 ExceptionDemoController
java.lang.Object
com.elitesland.ystdms.sys.controller.ExceptionDemoController
异常处理演示控制器
用于演示各种异常处理场景
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明triggerBusinessException(String message) triggerCustomBusinessException(@Min(value=0L,message="\u6570\u503c\u5fc5\u987b\u5927\u4e8e\u7b49\u4e8e0") Integer value) triggerNotFoundException(@NotBlank String id) triggerRuntimeException(Boolean shouldThrow) triggerUnauthorizedException(Boolean unauthorized) triggerValidationException(String value) validateObject(@Valid ExceptionDemoController.DemoRequest request)
-
构造器详细资料
-
ExceptionDemoController
public ExceptionDemoController()
-
-
方法详细资料
-
triggerBusinessException
-
triggerValidationException
-
triggerNotFoundException
-
triggerUnauthorizedException
-
validateObject
@PostMapping("/validate-object") public ApiResult<String> validateObject(@Valid @RequestBody @Valid ExceptionDemoController.DemoRequest request) -
triggerCustomBusinessException
-
triggerRuntimeException
-