강의_1장_스프링 부트 프로젝트 생성하기.pdf



ExamController.java
package com.boot;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import lombok.extern.slf4j.Slf4j;
@Slf4j //Lombok 추가 필요
@Controller
public class ExamController {
@RequestMapping("/")
public String home() {
log.info("hello boot");
System.out.println("hello boot");
return "hello";
}
}
폴더 생성

application.properties

pom.xml
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
hello.jsp
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
hello.jsp~
</body>
</html>
