본문 바로가기

Java

[Spring] Landing Page 설정

반응형

2021/03/06 - [Java] - [Spring] 설치 및 프로젝트 생성(Gradle)

 

설치 및 환경설정은 이전글을 참고해주세용!

 

 


 

지난 시간에 프로젝트를 실행을 하면

위와 같은 에러페이지가 나왔다. 이것을 마음대로 바꿔보자.

 

매우 간단하다.

 

1. src> main > resources > static 폴더에 "index.html"파일을 생성한다.

 

2. index.html

<!DOCTYPE HTML>
<html>
<head>
    <title>혁이는 코딩 중</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<h1>Hyuk is coding ...</h1>
</body>
</html>

3. 실행

 

 

이제 랜딩페이지가 에러가 안나오고 잘 나오는 것을 확인 할 수 있따.

 

 

 

 

 

참고사이트 : docs.spring.io/spring-boot/docs/2.4.3/reference/html/getting-started.html#getting-started

 

Getting Started

If you are getting started with Spring Boot, or “Spring” in general, start by reading this section. It answers the basic “what?”, “how?” and “why?” questions. It includes an introduction to Spring Boot, along with installation instructions.

docs.spring.io

 

 

 

 

반응형