Development [Gradle] dependency 관리 (related with maven bom) - 반응형 스프링 부트 애플리케이션에서 dependency를 관리하는 방법은 2가지이다 io.spring.dependency-management plugin 이용 gradle native bom 지원 이용 io.spring.dependency-management plugin plugin에서 제공하는 property를 이용하여 버전 등의 customizing 가능 plugin : https://plugins.gradle.org/plugin/io.spring.dependency-management plugins { id 'org.springframework.boot' version '2.7.17' id 'io.spring.dependency-management' version '1.0.15.RELEASE' } dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.kafka:spring-kafka' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.mysql:mysql-connector-j' runtimeOnly 'io.micrometer:micrometer-registry-prometheus' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.kafka:spring-kafka-test' testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' } 위와 같이 설정하면, spring-boot에서 관리하는 dependency의 경우에는 버전 정보를 명시해 줄 필요가 없다. 해당 spring-boot에서 사용하고 있는 버전은 아래의 링크에서 확인 가능하다 https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html {{current}}에 해당하는 정보를 사용하고있는 spring-boot 버전으로 설정 gradle native bom build 속도가 빠르다 dependencies { implementation platform('org.springframework.boot:spring-boot-dependencies:2.7.17') } 관련 가이드 : https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#managing-dependencies 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기my story 저작자표시 Contents io.spring.dependency-managementplugin gradlenativebom 당신이 좋아할만한 콘텐츠 [DevOps] SonarQube란(코드 정적 분석 도구) 2024.01.10 [Gradle] bootBuildImage task (buildpack, builder) 2023.12.15 [Gradle] dependencies - implementation, api 2023.11.29 [Reactive] Reactive Streams(리액티브 스트림즈) 2023.11.13 댓글 0 + 이전 댓글 더보기