青羊经侦大队-数据平台
baizonghao
2023-03-23 0261d270c9f9b5282d923e585c307aee44b0612c
src/main/java/com/example/jz/controller/TestController.java
@@ -1,8 +1,11 @@
package com.example.jz.controller;
import com.example.jz.auth.TokenJwtManager;
import com.example.jz.exception.BusinessException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -14,11 +17,13 @@
@RestController("test")
@Api(value = "测试接口", tags = "测试接口")
public class TestController {
    @Autowired
    TokenJwtManager tokenJwtManager;
    @GetMapping("/business")
    @ApiOperation("业务异常测试")
    public String test() {
        throw new BusinessException("业务异常");
        return null;
    }
    @GetMapping("/custom")