Spring Boot 2 热加载

20. Developer Tools

Gradle.

configurations {
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }
}
dependencies {
    developmentOnly("org.springframework.boot:spring-boot-devtools")
}

application.properties

spring.thymeleaf.cache=false

IDEA

  • Build Project Automatically

File –> Setting –> Build, Execution, Deployment –> Compiler –> check this Build project automatically

image
  • Intellij Registry

shift + shift 搜索 registry, 打开 registry...

image

找到并勾选以下选项
[x] compieler.automake.allow.when.app.running

image

安装chrome 插件

[图片上传失败...(image-3da59e-1545230302384)]LiveReload

修改代码保存后程序自动reload

修改静态资源需要手动 cmd + F9 构成程序

你可能感兴趣的:(Spring Boot 2 热加载)