💡 학습목표
1. 프로젝트 설정(ver 2.7.15)
2. 의존성 설정
C:\Users\GGG.m2\repository
1단계
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.15'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}
group = 'com.tencoding'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '11'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
추가 되어야 할 의존성
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0'
2단계 의존성 추가 및 그래들 새로고침
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.15'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}
group = 'com.tencoding'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '11'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0'
}
tasks.named('test') {
useJUnitPlatform()
}
주소 요청
http://localhost:8080/index.html
💡 도전 과제
URL 과 URI 에 대해 직접 조사해보기
URI(Uniform Resource Identifier) - 통합 자원 식별자
인터넷에 있는 자원을 어디에 있는지 자원 자체를 식별하는 방법이다.
URL(Uniform Resource Locator) - 위치
네트워크 상에서 자원이 어디 있는지 위치를 알려주기 위한 규약이다.