Replies: 2 comments 2 replies
-
|
mac 환경에서 터미널로 설치한건가요 ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
환경설정 정리 해야하나 고민했는데... 해야겠군요 ㅎㅎ 오 정리가 깔끔히 잘해주셨네요 ! ㅎㅎ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1_프로젝트 환경 설정
프로젝트 생성
라이브러리 살펴보기
View 환경설정
src/main/resources/static/index.html생성 시에 Welcome page 역할을 함localhost:8080/hello를 호출하면, Tomcat 웹 서버를 내장하고 있는 Spring Boot에hello에 대한 정보를 묻는다.HelloController내의@GetMapping("hello")에서hello를 매칭한다.model이 넘어간다. (스프링은 모델을 만들어서 넘겨준다.)addAttribute()를 통해, key값은 "data"이고, value값은 "hello!!로 넘겨준다.return "hello";한다. 이 return의 역할은resources/templates내에 존재하는hello.html을 찾아 렌더링하라는 의미이다. (디폴트)resources:templates/+ {viewName} +.html빌드하고 실행하기
./gradlew buildcd build/libsjava -jar hello-spring-0.0.1-SNAPSHOT.jarBeta Was this translation helpful? Give feedback.
All reactions