반응형
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
반응형
'Java' 카테고리의 다른 글
[Spring] 스프링 부트 라우터(정적컨텐츠, MVC패턴, API 이용) (0) | 2021.03.06 |
---|---|
[Spring] 설치 및 프로젝트 생성(Gradle) (0) | 2021.03.06 |
[Spring] Maven, pom.xml이 뭐에요?(정의) (3) | 2021.02.05 |
[Spring] DB연동하기1 (db연결 세팅하기) (0) | 2021.01.31 |
[Spring] spring 설치 (0) | 2021.01.26 |