Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
개요
작업사항
Spring 에서는 MongoDriver 가 발견되면 MongoAutoConfiguration이 default 로 설정되는 이슈가 있습니다.
default 는 localhost:27017 로 설정이 됩니다. 본인 로컬로 켜진 몽고DB 로 연결되버립니다. MongoAtlas 로 연결하려면 저 설정을 꺼둬야 합니다.
@SpringBootApplication(exclude = [MongoAutoConfiguration::class, MongoDataAutoConfiguration::class])
설정을 해도 반영이 안되더라구요. yml 세팅이 먹혀서 일단 이렇게 세팅했습니다.
[stackoverflow Mongo tries to connect automatically to port 27017(localhost)