인프런 김영한님 강의/1 . 스프링 부트 입문
[스프링 부트] 4. Welcome Page 만들기(index.html)***
이대곤
2022. 6. 20. 11:48
* resources/static/ 경로에 index.html 파일을 만들어두면 http://localhost:8080/ 접속시
디폴트로 연결해주는 페이지가 아니라 이쪽으로 접속된다.
즉, 스프링부트는 해당 경로에 index.html을 작성해주면 이게 메인 페이지가 되도록 설계되어있다.
1. resources/static/ 아래에서 index.html 파일 만들기
2. 강의자료에서 html 코드 복붙
<!DOCTYPE HTML>
<html>
<head>
<title>Hello</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
Hello
<a href="/hello">hello</a>
</body>
</html>