| | |
| | | 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; |
| | | |
| | |
| | | @RestController("test") |
| | | @Api(value = "测试接口", tags = "测试接口") |
| | | public class TestController { |
| | | @Autowired |
| | | TokenJwtManager tokenJwtManager; |
| | | |
| | | @GetMapping("/business") |
| | | @ApiOperation("业务异常测试") |
| | | public String test() { |
| | | throw new BusinessException("业务异常"); |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/custom") |