spring starter 사이트로 이동해서 생성하거나, intellij에서 new project로 생성하는 방법이 있다.
본인은 사이트에서 여러번 생성해보았으므로 , intellij에서 생성해보겠다!

Name : 프로젝트 이름
Gradle을 사용하고 JDK 버전 & java 버전 : 17 사용

Dependencies는 일단 Spring Web, Thymeleaf를 사용할 것이다.
나중에 필요한 것들은 추가할 수 있으므로 일단은 이렇게 시작해보자 !

HomeController.java
@Controller
public class HomeController {
@GetMapping("/")
public String index(){
return "index";
}
}
index.html
resources -> templates -> index.html생성
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
</head>
<body>
<h1>Index Page!</h1>
</body>
</html>


