whycxzp
2021-07-26 8c189b243bfbbacb2ab1ce79f4e1ff22708f125a
src/main/java/com/whyc/controller/TestController.java
@@ -2,10 +2,13 @@
import com.whyc.dto.Response;
import com.whyc.dto.multiTree.MultiTree;
import com.whyc.exception.first.CustomExceptionResultHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@@ -14,7 +17,8 @@
 */
@RestController
@RequestMapping("test")
@ApiIgnore
@Api(tags = "test")
@Slf4j
public class TestController {
    @GetMapping("test")
@@ -27,4 +31,15 @@
        MultiTree tree = new MultiTree().saveAsTree(dateArr);
        return new Response<MultiTree>().set(1,tree);
    }
    @GetMapping("test2")
    @ApiOperation(value = "test2")
    public Response test2(@RequestParam Integer num){
        System.out.println("执行了test2的方法1");
        log.info("哈哈");
        byte b = num.byteValue();
        System.out.println("执行了test2的方法");
        return new Response().set(1,num);
    }
}