From f227e6ac3439116a0f8cc185bce053e19bd65307 Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 28 十二月 2022 11:50:16 +0800
Subject: [PATCH] fix: 优化code
---
src/main/java/com/example/jz/controller/TestController.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/example/jz/controller/TestController.java b/src/main/java/com/example/jz/controller/TestController.java
index 7cdf69a..7cde586 100644
--- a/src/main/java/com/example/jz/controller/TestController.java
+++ b/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")
--
Gitblit v1.8.0