1. build.gradle 설정
plugins {
id 'org.springframework.boot' version '2.1.8.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
id 'war'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
//tomcat
compile 'org.apache.tomcat.embed:tomcat-embed-jasper'
//jstl
compile 'javax.servlet:jstl:1.2'
//tiles
compile group: 'org.apache.tiles', name: 'tiles-jsp', version: '3.0.7'
//lombok
compile "org.projectlombok:lombok:1.16.6"
}
맨 하단에 lombok 항목 추가
2. MainController 수정
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class MainController {
@GetMapping("/")
public String main() {
return "/tiles/view/main";
}
}
@GetMapping으로 수정할수 있음
'스프링' 카테고리의 다른 글
[Spring] 엑셀 다운로드 (0) | 2019.11.28 |
---|---|
[4] Spring boot Mybatis + Mysql + gradle 설정 (0) | 2019.09.28 |
[2] Spring Boot TilesConfig 설정 (0) | 2019.09.28 |
[1] Spring Boot 웹프로젝트 만들기 (0) | 2019.09.28 |
[Spring] 파일업로드 (0) | 2019.07.19 |