Spring boot 를 Intellij15 에서 실행하니 hot swapping 이 안되서 한참 찾아봄
tomcat 프로젝트로 변경해서는 되는데 bootRun으로 하니 리소스나 html, class 수정해도 반응이 없음
IDE 설정을 변경하고 나니 제대로 수행됨
1. Gradle Settings
buildscript {
ext {
springBootVersion = '1.3.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'org.springframework:springloaded:1.2.5.RELEASE'
}
}
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}
gradle idea
2. IDE Settings
preferences > build,Execution, Deployment > Compiler > check "Make project automatically"
Help > Find Action > search "Registry" > check "compiler.automake.allow.when.app.running"
gradle idea bootRun
참고 :http://www.greggbolinger.com/spring-boot-live-reload-with-gradle-and-intellij-15/