일부 수정
This commit is contained in:
@@ -41,7 +41,7 @@ public class ImgController {
|
||||
|
||||
//요청 전송
|
||||
ResponseEntity<String> response =
|
||||
restTemplate.postForEntity("http://localhost:9002/ocr",
|
||||
restTemplate.postForEntity("http://127.0.0.1:9002/ocr",
|
||||
requestEntity, String.class);
|
||||
|
||||
return ResponseEntity.ok(response.getBody());
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import site.ocr.prd.components.JwtProvider;
|
||||
@@ -26,11 +25,12 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
public class LoginController {
|
||||
|
||||
//service 선언
|
||||
private LoginService loginService = new LoginService(WebClient.builder());
|
||||
private final LoginService loginService;
|
||||
//JWT 선언
|
||||
private final JwtProvider jwtProvider;
|
||||
|
||||
public LoginController(JwtProvider provider) {
|
||||
public LoginController(LoginService loginService, JwtProvider provider) {
|
||||
this.loginService = loginService;
|
||||
this.jwtProvider = provider;
|
||||
}
|
||||
/**
|
||||
@@ -38,7 +38,7 @@ public class LoginController {
|
||||
* @param redirectRespn 카카오에서 리다이렉트해준 인가코드
|
||||
*/
|
||||
@GetMapping("/oauth/oauth-kakao-authorize") //kakao에서 get으로 리다이렉트 해줌
|
||||
public ResponseEntity kakaoLoginRequestDto(HttpServletRequest redirectRespn) {
|
||||
public ResponseEntity kakaoLoginRequest(HttpServletRequest redirectRespn) {
|
||||
String code = redirectRespn.getParameter("code");
|
||||
System.out.println("인가코드 :: " + code);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user