뭐든지시작이반이다
Dream Future
뭐든지시작이반이다
  • 분류 전체보기
    • Spring
      • 개념
      • 기타
    • Java
    • Algorithm
      • 알고리즘 정리
    • DB
      • Postgresql
    • 트러블슈팅
    • Git & Github
    • V&V
    • EFK
    • 북스터디
    • 기타

인기 글

최근 댓글

전체 방문자
오늘
어제

블로그 메뉴

  • 홈
  • 태그
  • 방명록

태그

  • gradle
  • mybatis
  • Kotlin
  • springbot
  • SelectionSort
  • 트러블슈팅
  • efk
  • requestmapping
  • github
  • 알고리즘
  • spring-boot
  • SqlSessionFactory
  • fluentd
  • gitignore
  • Hibernate
  • 대규모서비스
  • Controller
  • multimodule
  • git
  • spring
  • Kibana
  • dirtyChecking
  • lombok
  • docker
  • ambiguous오류
  • 파티셔닝
  • springboot
  • sqlSessionTemplate
  • auditing
  • JPA
hELLO · Designed By 정상우.
뭐든지시작이반이다

Dream Future

Spring/개념

gradle 개념 정리

2022. 1. 3. 23:53

spring-boot 의존성을 위한 build.gradle 파일 내의 기본적인 용어에 대해 정리한다.

  • 플러그인 의존성 관리를 위한 설정
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
buildscript {
    ext {
        springBootVersion = '2.5.2'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:
                    spring-boot-gradle-plugin:${springBootVersion}")
    }
}
 
plugins {
    id 'java'
}

apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'eclipse'
 
group 'com.example.smspring'
version '1.0-SNAPSHOT'
sourceCompatibility = '11'
 
repositories {
    mavenCentral()
}
 
dependencies {
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
 
test {
    useJUnitPlatform()
}
Colored by Color Scripter
cs
줄 용어 내용
2 ext build.gradle에서 사용하는 전역 변수 선언
19 io.spring.dependency-management 스프링 부트 의존성 관리 플러그인
반드시 추가해야한다
26 repositories 의존성을 다운받을 저장소명
jcenter()는 deprecated 되었으므로 mavenCentral만 사용하도록 한다
31 implementation gradle 7 이상 버전에서는 compile 대신 implementation 을 사용한다
스프링 부트 관련 의존성 버전을 명시하지 않으면 3줄의 버전을 따른다

 

저작자표시 비영리 동일조건 (새창열림)

'Spring > 개념' 카테고리의 다른 글

IoC 제어의 역전  (0) 2022.04.14
JPA Auditing 이란?  (0) 2022.01.14
    'Spring/개념' 카테고리의 다른 글
    • IoC 제어의 역전
    • JPA Auditing 이란?
    뭐든지시작이반이다
    뭐든지시작이반이다
    기록장입니다.

    티스토리툴바