처음 프로젝트 만들때부터 클라우드 넣어서 만든다면 문제 없이 잘 됐었겠지만,,
프로젝트를 분리하면서 처음부터 cloud를 넣지 않은 프로젝트를 eureka에 등록하려 하니 잘 되지 않았다.
dependencies {
implementation 'org.springframework.cloud:spring-cloud-config-server'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
build.gradle에 단순히 dependencies만 추가했기 때문..!
ext {
set('springCloudVersion', "2022.0.4")
}
dependencies {
implementation 'org.springframework.cloud:spring-cloud-config-server'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
이렇게 ext와 dependencyManagement도 함께 추가해줘야 잘 등록하여 사용할 수 있다.
아하! 유레카 사용할 때 gradle 설정에 주의해야겠네요~
덕분에 시간 아꼈습니다 ㅎㅎ