IT 정보/Spring

[Spring] build.gradle 설정

개발하는 동그리 2022. 8. 18. 13:28
728x90
반응형
plugins {
   id 'org.springframework.boot' version '2.7.1'
   id 'io.spring.dependency-management' version '1.0.11.RELEASE'
   id 'java'
}

group = '그룹 이름'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'

repositories {
   mavenCentral()
}

dependencies {

   //spring data JPA 사용
   implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
   
   // validation 사용
   implementation 'org.springframework.boot:spring-boot-starter-validation'
   
   // 
   implementation 'org.springframework.boot:spring-boot-starter-web'
   
   // h2 데이터 베이스 사용
   runtimeOnly 'com.h2database:h2'
   
   // 애너테이션 사용 (getter, setter 등등..)
   compileOnly 'org.projectlombok:lombok'
   annotationProcessor 'org.projectlombok:lombok'
   
   
   testImplementation 'org.springframework.boot:spring-boot-starter-test'
   
   // mapstruct 등록 (for Mapper)
   implementation 'org.mapstruct:mapstruct:1.5.1.Final'
   annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.1.Final'
   
   implementation 'org.springframework.boot:spring-boot-starter-mail'

   // gson 라이브러리 등록 
   implementation 'com.google.code.gson:gson'
}

tasks.named('test') {
   useJUnitPlatform()
}
728x90
반응형

'IT 정보 > Spring' 카테고리의 다른 글

[Spring] @RestControllerAdvice & @ControllerAdvice  (1) 2024.12.12
[Spring] application.yml 설정  (1) 2022.08.18
[Spring] API 문서화  (17) 2022.07.18
[Spring] 스프링 MVC 정리 (1)  (10) 2022.07.16
[스프링 부트와 JPA 활용] 2편  (0) 2022.07.14