You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1.프로젝트 환경 설정
1️⃣프로젝트 생성
프로젝트 만들기는 start.spring.io 에서도 프로젝트 생성을 할 수 있다. 강의에서도 그렇게 시작합니다.
새로운 방식?으로 프로젝트를 생성해보겠습니다.
인텔리제이로 만드는 방법으로 진행해보겠습니다.
2️⃣라이브러리 살펴 보기
Gradle은 의존관계가 있는 라이브러리를 함께 다운로드 한다.
스프링 부트 라이브러리
spring-boot-starter-web
테스트 라이브러리
3️⃣View 환경설정
Welcome Page 만들기
resources/static/index.html
스프링 부트가 제공하는 Welcme Page 기능
thymelead 템플릿 엔진
thymelead 공식 사이트 https://www.thymeleaf.org/
스프링 공식 튜토리얼 https://spring.io/guides/gs/serving-web-content/
스프링부트 메뉴얼 : https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-spring-mvc-welcome-page
resources/templates/hello.html
thymeleaf 템플릿엔진 동작 확인
컨트롤러에서 리턴 값으로 문자를 반환하면 뷰 리졸버( viewResolver )가 화면을 찾아서 처리한다.
4️⃣빌드하고 실행하기
빌드하고 실행하기
콘솔로 이동
💡 윈도우 사용자를 위한 팁
콘솔로 이동 명령 프롬프트(cmd)로 이동
./gradlew gradlew.bat 를 실행하면 됩니다.
명령 프롬프트에서 gradlew.bat 를 실행하려면 gradlew 하고 엔터를 치면 됩니다.
gradlew build
Beta Was this translation helpful? Give feedback.
All reactions