728x90
✏️ 스프링 부트와 AWS로 혼자 구현하는 웹 서비스 책을 보면서 스터디 한 내용을 정리하였습니다
1장 인텔리제이로 스프링 부트 시작하기
이미 스프링부트 강의를 초기에 조금 들었어서 인텔리제이가 설치되어 있었다! 따라서 설치 부분은 따로 정리하진 않았다
💜인텔리제이 설정
build.gradle 맨 위에 설치할 코드
plugins {
id 'java'
}
group = 'org.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
buildscript {
ext{
springBootVersion = '2.1.7.RELEASE'
}//build.gradle에서 사용하는 전역변수를 설정하겠다는 의미
repositories{
mavenCentral()
jcenter()
}//각종 의존성(라이브러리)들을 어떤 원격 저장소에서 받을지 정한다
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin: ${springBootVersion}")
}
}
test {
useJUnitPlatform()
}
💠ext
- /build.gradle에서 사용하는 전역변수를 설정하겠다는 의미
💠repositories
- 각종 의존성(라이브러리)들을 어떤 원격 저장소에서 받을지를 정합니다.
- mavenCentral을 많이 사용하지만, 최근에는 라이브러리 업로드 난이도 때문에 jcenter도 많이 사용한다
mavenCentral
- 이전부터 많이 사용하는 저장소
jcenter
- 라이브러리 업로드를 간단하게 한다
💠dependencies
- 프로젝트 개발에 필요한 의존성들을 선언하는 곳
- 인텔리제이는 메이븐 저장소의 데이터를 인덱싱해서 관리하기 때문에 커뮤티니 버전을 사용해도 의존성 자동 완성이 가능하다
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.15'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'eclipse'
}
group = 'com.jojoldu.book'
version = '1.0.4-SNAPSHOT-' + new Date().format("yyyyMMddHHmmss")
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
// Spring Boot Starter dependencies
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-mustache'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
// Additional dependencies
implementation 'org.projectlombok:lombok'
implementation 'com.h2database:h2'
implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'org.springframework.session:spring-session-jdbc'
// Testing dependencies
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
}
test {
useJUnitPlatform()
}
728x90
'⚙️ Back-end > Spring' 카테고리의 다른 글
[Spring Boot] 2주차 스터디 : 3장 스프링 부트에서 JPA로 데이터 베이스를 다뤄보자 (1) | 2025.01.14 |
---|---|
[Spring Boot] 1주차 스터디 : 2장 스프링 부트에서 테스트 코드를 작성하자 (1) | 2025.01.14 |
Springboot [5] : 데이터베이스 개념 (1) | 2024.03.15 |
Springboot [4] : 테스트 (3) | 2024.03.05 |
Springboot [3] : 스프링부트 구조 이해하기 (0) | 2024.03.04 |