devtools ์ค์
๋ณ๊ฒฝ์ฌํญ์ ์๋์ผ๋ก ๋น๋ ํด์ฃผ๋ devtools๋ฅผ gradle ํ๋ก์ ํธ์์ ์ฌ์ฉํ๊ธฐ ์ํ ์ค์ ์ ์์๋ณด์.
build.gradle ์์กด๊ด๊ณ ์ค์
dependencies {
//...
developmentOnly 'org.springframework.boot:spring-boot-devtools'
//...
}
build.gradle์ ๋ค์๊ณผ ๊ฐ์ ์์กด๊ด๊ณ๋ฅผ ์ค์ ํ๋ค.
setting -> Build, Execution, Deployment -> Compiler
ํด๋น ๋ถ๋ถ์ ๋ค์ด๊ฐ์ Build project automatically๋ฅผ ์ฒดํฌํด ์ค๋ค.
Registry ์ค์
ctrl + shift + alt + /
ํ registry๋ก ๋ค์ด๊ฐ์ ๋ค์๊ณผ ๊ฐ์ ํญ๋ชฉ์ ์ฒดํฌํ๋ค.
compiler.automake.allow.when.app.running
ํญ๋ชฉ์ด๋ค.
application.yml ์ค์
application.yml
์ ๋ค์๊ณผ ๊ฐ์ ์ค์ ์ ์ถ๊ฐํ๋ค.
spring:
devtools:
livereload:
enabled: true
freemarker:
cache: false
application.property
๋ฅผ ์ฌ์ฉํ๋ฉด ๋ฌธ๋ฒ์ ๋ง๊ฒ ๊ณ ์ณ์ ์ถ๊ฐํ๋ค.
intellij ์ฌ์์
์ฌ์์ ํ devtool์ด ์๋ํจ์ ์ ์ ์๋ค.