์ ์ ์ปจํ
์ธ ์๋น ํ๋ฆ ์ง๋ฌธ๋๋ฆฝ๋๋ค
์ผ์ด๋์ ์๊ฐํด๋ณด๋, ํน์ ๊ทธ๋ ๋ค๋ฉด ์ปจํธ๋กค๋ฌ์ ๋งคํ๋๋ URL์๋ ํ์ฅ์๋ฅผ ํฌํจํด์ ๊ตฌํํด๋ณด๋ฉด ์ด๋จ๊น ์ถ์ด ์๋์ ๊ฐ์ด ๊ตฌํํด๋ณด์๋๋ฐ,package hello.hellospring; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @Controller public class HelloController { @GetMapping("/hello-static.html") String helloStatic() { return "hello-static-template"; } }์ด๋ฒ์๋ ํ
ํ๋ฆฟ ์์ง์ ๊ฑฐ์ณ ๋ทฐ๊ฐ ๋ ๋๋ง๋์์ต๋๋ค. ์ค์ค๋ก ๋๋ตํ๊ฒ ๋์์ต๋๋ค๋ง.. ์ ๋ฆฌํ์๋ฉด,๊ฐ์ํ์ ๋๋ก ์ปจํธ๋กค๋ฌ๋ฅผ ๋จผ์ ๊ฑฐ์น๋ ๊ฒ์ด ๋ง์ง๋ง, hello-static ๊ด๋ จ ์ปจํธ๋กค๋ฌ๋ผ๋ ๊ต์ฌ์ ์๋ฉ์ ์กฐ๊ธ ์คํดํด์ ์๋ชป ์ดํดํ๋ค์..! ์์ ํ์ฅ์๊น์ง ํฌํจํ hello-static.html์ผ๋ก ๋งคํ์์ผ์ ์ปจํธ๋กค๋ฌ๋ฅผ ๋ง๋ค๋ฉด 'MVC์ ํ
ํ๋ฆฟ ์์ง' ๋ฐฉ์์ผ๋ก ์ ์๋น๋๋ ๊ฒ์ ํ์ธํ์์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค.