You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
스프링 부트 스타터와 라이브러리 관리 정리 노트
1. 라이브러리 직접 관리의 어려움
1-1. 프로젝트 초기 설정의 문제점
1-2. 예시 Gradle 설정 (버전 직접 지정)
dependencies { implementation 'org.springframework:spring-webmvc:6.0.4' implementation 'org.apache.tomcat.embed:tomcat-embed-core:10.1.5' implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1' implementation 'org.springframework.boot:spring-boot:3.0.2' implementation 'org.springframework.boot:spring-boot-autoconfigure:3.0.2' implementation 'ch.qos.logback:logback-classic:1.4.5' implementation 'org.apache.logging.log4j:log4j-to-slf4j:2.19.0' implementation 'org.slf4j:jul-to-slf4j:2.0.6' implementation 'org.yaml:snakeyaml:1.33' }2. 스프링 부트의 라이브러리 버전 관리 기능
2-1. 자동 버전 관리
io.spring.dependency-management플러그인을 통해 사용 가능2-2. 예시
plugins { id 'org.springframework.boot' version '3.0.2' id 'io.spring.dependency-management' version '1.1.0' id 'java' } dependencies { implementation 'org.springframework:spring-webmvc' implementation 'org.apache.tomcat.embed:tomcat-embed-core' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'org.springframework.boot:spring-boot' implementation 'org.springframework.boot:spring-boot-autoconfigure' implementation 'ch.qos.logback:logback-classic' implementation 'org.apache.logging.log4j:log4j-to-slf4j' implementation 'org.slf4j:jul-to-slf4j' implementation 'org.yaml:snakeyaml' }2-3. BOM의 정의
spring-boot-dependencies가 BOM 역할 수행2-4. 스프링 부트가 관리하지 않는 라이브러리의 경우
implementation 'org.yaml:snakeyaml:1.30'3. 스프링 부트 스타터 (Starter)
3-1. 개념
3-2. 예시
dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' }3-3. Starter 이름 패턴
spring-boot-starter-*thirdpartyproject-spring-boot-starter3-4. 자주 사용하는 스타터
spring-boot-starter: 핵심 설정, 로깅, YAML
spring-boot-starter-web: REST API, MVC, 톰캣
spring-boot-starter-data-jpa: JPA, 하이버네이트
spring-boot-starter-jdbc: JDBC, 커넥션풀
spring-boot-starter-validation: Bean Validation
spring-boot-starter-batch: Spring Batch
4. 외부 라이브러리 버전 변경 방법
4-1. 방식
Beta Was this translation helpful? Give feedback.
All reactions