JAVA
[IntelliJ]IntelliJ에서 Spring boot 설정
monad
2021. 6. 10. 18:09
1. openJDK 설치
2. IntelliJ Download and Installation
3. New Project in IntelliJ
1.openJDK 설치
파일명: OpenJDK11U-jdk_x64_windows_hotspot_11.0.11_9.msi
인스톨 중 JAVA_HOME 설정을 체크하여 인스톨합니다.
Win+R > sysdm.cpl, 3 > 환경변수를 확인합니다.
2. IntelliJ Download and Installation
https://www.jetbrains.com/ko-kr/idea/download/#section=windows
3. New Project in IntelliJ
New Proejct > Gradle > Project SDK > Add JDK를 통해서 인스톨한 JDK를 선택합니다.
build.gradle에 이하의 내용을 추가
plugins {
id 'org.springframework.boot' version '2.5.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'war'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}