본문으로 건너뛰기
이준석 개발 블로그
돌아가기

프로젝트 환경설정 2

3분 분량이 글 고치기
목차 · 4

View 환경설정

Welcome Page 만들기

<!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

동작 환경 그림

Untitled

참고: spring-boot-devtools 라이브러리를 추가하면, html 파일을 컴파일만 해주면 서버 재시작 없이 View 파일 변경이 가능하다. intellij 컴파일 방법: 메뉴 build → Recompile

빌드하고 실행하기

서버를 배포할 때 아래 jar 파일을 복사해서 넣어준 후 java -jar로 실행시키면 된다.

  1. 프로그램이 들어있는 폴더까지 접근

Untitled

  1. ./gradlew clean build 입력

Untitled

build 폴더 생성

  1. java -jar .\hello-spring-0.0.1-SNAPSHOT.jar

Untitled

spring을 powershell에서 실행시키기


이 글 고치기
이 글 공유하기:

이전 글
프로젝트 환경설정 1
다음 글
회원 관리 예제