|
@@ -4,10 +4,7 @@ package com.raycos.raycosdatacenterapi.authorize;
|
|
|
import com.raycos.raycosdatacenterapi.config.RaycosUtils;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-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 org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.Map;
|
|
@@ -26,10 +23,10 @@ public class AuthcodeController {
|
|
|
* @param request
|
|
|
*/
|
|
|
@GetMapping(value = "/authcode")
|
|
|
- public void authcode(HttpServletRequest request){
|
|
|
+ public @ResponseBody String authcode(HttpServletRequest request){
|
|
|
Map resultMap = RaycosUtils.getParameterMap(request);
|
|
|
try {
|
|
|
- amzTokenService.saveAmzToken(resultMap);
|
|
|
+ return amzTokenService.saveAmzToken(resultMap);
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|