89DAYS) [Pre-Project] AWS 배포 세팅 작업, Member-Question-Answer 응답 매핑

nacSeo (낙서)·2023년 2월 23일
0

다른 BE분들과 배포를 위해 AWS 배포 세팅 작업을 오전에 진행했다. 팀장인 조원분의 AWS 계정을 통해, 배포 때 배운 내용들을 기반으로 EC2 인스턴스 생성, S3, RDS 등등 여러 설정 작업을 진행했다. Github는 conflict날까봐 무섭고, AWS는 까딱하다 과금이 날까 두렵다 😅😅

여튼 세팅을 어찌어찌 해두고, 다시 코드로 돌아와 어제 진행했던 Member-Question 매핑에 추가적으로 Answer까지 매핑해주었다.

매핑 과정은 JPA 학습 때를 참고해 그렇게까지 어렵진 않았는데 역시 여기서도 에러가 발생했다.

해당 에러 메시지 💥

Description:

The dependencies of some of the beans in the application context form a cycle:

   answerController defined in file [/Users/kimchangha/Desktop/projects/Section5/pre-project/new/seb42_pre_024/backend/build/classes/java/main/com/codestates_pre024/stackoverflow/answer/controller/AnswerController.class]
┌─────┐
|  answerService defined in file [/Users/kimchangha/Desktop/projects/Section5/pre-project/new/seb42_pre_024/backend/build/classes/java/main/com/codestates_pre024/stackoverflow/answer/service/AnswerService.class]
↑     ↓
|  questionService defined in file [/Users/kimchangha/Desktop/projects/Section5/pre-project/new/seb42_pre_024/backend/build/classes/java/main/com/codestates_pre024/stackoverflow/question/service/QuestionService.class]
└─────┘


Action:

Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.

Question Service - Answer Service 무한 순환 에러가 발생한 것이다. 관련해서 BE 조원들과 모여 머리를 맞대어 해결하려 노력했다. 끝내 해결...!!!
관련 사이트

오늘도 레전드 에러를 만나서 참 보람차고 알찬 하루였다 🤣🤣

profile
백엔드 개발자 김창하입니다 🙇‍♂️

0개의 댓글