|
@@ -1,5 +1,6 @@
|
|
|
package shop.alien.second.controller;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiSort;
|
|
|
import jdk.nashorn.internal.objects.annotations.Getter;
|
|
@@ -9,6 +10,9 @@ import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import shop.alien.util.common.JwtUtil;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
@Slf4j
|
|
|
@Api(tags = {"二期-阿里接口"})
|
|
@@ -20,7 +24,11 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
public class TestController {
|
|
|
|
|
|
@GetMapping("test")
|
|
|
- public String test() {
|
|
|
+ public String test(HttpServletRequest request) {
|
|
|
+ JSONObject data = JwtUtil.getTokenInfo(request.getHeader("Authorization"));
|
|
|
+
|
|
|
+ System.out.println(222222);
|
|
|
+ System.out.println(data);
|
|
|
return "hello world";
|
|
|
}
|
|
|
|