|
|
|
@ -5,6 +5,7 @@ import cc.yunxi.common.exception.BadRequestException;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/test")
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class TestController {
|
|
|
|
|
|
|
|
|
|
@ApiOperation("测试接口成功")
|
|
|
|
@ -27,4 +29,14 @@ public class TestController {
|
|
|
|
|
public CommonResult<String> failed() {
|
|
|
|
|
throw new BadRequestException("error");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation("测试日志打印")
|
|
|
|
|
@GetMapping("/test03")
|
|
|
|
|
public CommonResult<String> print() {
|
|
|
|
|
log.debug("debug log...");
|
|
|
|
|
log.info("info log...");
|
|
|
|
|
log.warn("warn log...");
|
|
|
|
|
log.error("error log...");
|
|
|
|
|
return CommonResult.success("ok");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|