목록프로젝트/Tripture (2)
개발하는 감자
✅ 테스트 서버API 1차 개발 완료 후, 프론트 분들이 테스트와 함께 개발하실 수 있도록 테스트 서버를 만들어 달라는 요청을 받았다.많은 클라우드 서비스가 있지만, 시간이 없는 관계로 전에 한번 경험했던 EC2를 사용해 테스트 서버를 배포했다.( 그때의 수많은 시행착오를 기억하지 못했다.. ) 서버는 그냥 간단하게 EC2에 Nginx를 설치해 배포했고 80번 포트로 요청했을 때, spring 서버인 8080포트로 연결되도록 설정해 주었다. ✅ 과정, 시행착오1. 먼저, EC2를 만들고, ssh 를 통해 연결해 주었다.이 과정은 예전 수업 자료를 통해 해주었고, ssh 연결 도중WARNING UNPROTECTED PRIVATE KEY FILE권한이 너무 많이 열려있어 발생하는 에러로, 해당 블로그를 참고..
카카오 로그인 구현 도중, 액세스 토큰까지 발급이 다 완료된 상태인데 토큰을 통해 사용자 정보 조회하는 과정에서 401 에러가 계속해서 발생했다. 검색해 보면 해당 에러는 거의 api 호출 시 정보를 제대로 전송하지 않아 발생되는 에러였는데, 계속 확인해 봐도 HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);headers.setBearerAuth(accessToken); 헤더에 정보를 제대로 잘 전달하고 있었다. - 카카오 로그인 API 토큰을 이용한 사용자 정보 조회 시 헤더에 담아 넘겨야 할 값 https://developers.kakao.com/docs/latest/..