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

20230712111151.png

20230712111428.png

20230712111723.png

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";
	}
}

폴더 생성

20230712114726.png

application.properties

20230712115108.png

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>

20230712115141.png