์ค๋์ ์ธํ ๋ฆฌ์ ์ด ์ค์น ๋ฐ ์ธํ ๋ฐฉ์์ ๋ํด ์จ ๋ณผ ์๊ฐ. ์ค์ ์ด ์๋ฐ์ ์์ด์ ๋ฐ์ด๋ผ๊ณ ๋ด๋ ๋ฌด๋ฐฉํ๋ค. ์ ๋ง ์ค๋ ์๊ฐ์ด ๊ฑธ๋ ธ๋ค.
https://www.jetbrains.com/ko-kr/idea/download/other.html
์ด ์ฌ์ดํธ์์
Windows x64์ค์นํด ์ฃผ์
์๋ฐ ์ค์น๋ ์ ๋์ด ์๋ค.
ํ๊ฒฝ๋ณ์๋ก ๋ค์ด๊ฐ ํ์
path๋ฅผ ์ฐพ๊ณ ๋๋ธํด๋ฆญ. classpath์๋๋ค.
๊ทธ๋ ๊ฒ ํ์ ๋ ์ ์ผ ๋จผ์ ๋จ๋ ๊ฒ %JAVA_HOME์ด์ด์ผ ํ๋ค.
์ฌ์ค ์์ ๋ถ๋ถ์ ๋์ค์ ํ์ด์ง ์๋ฌ๊ฐ ๋จ๊ฑฐ๋ ์๋ฒ๊ฐ ๊ฐ๋๋์ง ์์ ๋ ํ๋ ์ตํ์ ์ค๋ฅ ํ์ง ๋ฐฉ๋ฒ์ธ๋ฐ, ์์ ๊ณผ์ ์ ๊ฑฐ์น์ง ์์์ฑ๋ก ์ค๋ฅ๋ฅผ ์ฐพ๊ฒ ๋๋ฉด ์ด๋๊ฐ ์ค๋ฅ์ธ์ง๋ ๋ชจ๋ฅธ ์ฑ ๋๋ฌด ํค๋งค๊ฒ ๋๋ค.
ํ์ผ ์์น๋ ์ด๋ฐ์์ผ๋ก ์ด๋ฃจ์ด ์ง๋ค.
์๋ฒ์ ์ค์ . ์ฌ๊ธฐ์ ๋ด JDK๋ฒ์ ์ 11์ธ๋ฐ 17๋ก ํด๋ ์๊ด์ ์๋ ๋ฏ.
package com.example.day01.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class HomeController {
@GetMapping("/")
public String index(){
return "example";
}
}
์ด๊ฒ homecontroller. ์ด๋ ๊ฒ ํจ์ผ๋ก์ static์ index๊ฐ ์๋ templates์ example.htmlํ์ผ์ด ํธ์ถ๋๋ค.
spring.application.name=day01
server.port=8082
properties
package com.example.day01;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication // ์ด๋ฏธ ์ปดํฌ๋ํธ ์ค์บ์ ํฌํจํ๊ณ ์์ต๋๋ค.
public class Day01Application {
public static void main(String[] args) {
SpringApplication.run(Day01Application.class, args);
}
}
application
์ด๋ฐ์์ผ๋ก ์๋ฒ๊ฐ ๋์ํ๊ฒ ๋๋ค.