Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

모듈 중 MongoDB dependency 적용 위치 #2

Open
gkdbssla97 opened this issue Apr 29, 2024 · 0 comments
Open

모듈 중 MongoDB dependency 적용 위치 #2

gkdbssla97 opened this issue Apr 29, 2024 · 0 comments

Comments

@gkdbssla97
Copy link
Contributor

목적

implementation ('org.springframework.boot:spring-boot-starter-data-mongodb') dependency를 추가해야 한다.

  1. MongoDB는 프로젝트 내 어느 모듈에서 사용되는가?
  2. MongoDB를 사용하는 모듈은 하나인가, 아니면 여러 개인가?

사용 이유

크롤링한 데이터를 TrollInspector 모듈 내에 @document가 포함된 MatchRecord 클래스에 매핑한 후 MongoDB에 저장해야 한다. @document 어노테이션은 클래스가 MongoDB의 문서(document)에 매핑되어야 함을 스프링 데이터에 알려주어야 스프링 데이터 MongoDB는 해당 클래스의 인스턴스를 MongoDB의 문서로 자동으로 변환하고 저장할 수 있기 때문이다.

완료조건

루트 모듈 또는 서브 모듈 중 MongoDB 의존성을 적용해야한다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant