title: Spring Boot: hot swapping does not work
body: <p>I'm using Spring Boot 1.3.2 with gradle plugin. In my multipart project hot swapping/reload for HTML/JS/CSS files does not work.</p>
  
  <pre><code>/resources
    |-wro.groovy
    |-application.yml
    |-/templates/(all *.html files and index.html)
    |-/static/
        |-/js/
        |-/css/
  </code></pre>
  
  <p><strong>application.yml</strong></p>
  
  <pre><code>server:
   port: 8080
  
  spring:
    thymeleaf:
      cache: false
      prefix: classpath:/templates/
      suffix: .html
      enabled: true
      encoding: UTF-8
      mode: HTML5
  </code></pre>
  
  <p>In te projet also used: wro4j, thymeleaf, AngularJS</p>
  
  <p>Part of <strong>gradle.build</strong></p>
  
  <pre><code>buildscript {
      ext { springBootVersion = '1.3.2.RELEASE' }
      repositories {
          maven {
              url "https://ourartifactoryUrl/plugins-release"
              credentials {
                  // artifactory log and pass
              }
          }
      }
      dependencies {
          classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: springBootVersion
          classpath group: 'io.spring.gradle', name: 'dependency-management-plugin', version: '0.5.2.RELEASE'
          classpath group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '3.1.+'
          classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
  
      }
  }
  
  apply plugin: 'spring-boot'
  apply plugin: 'io.spring.dependency-management'
  apply plugin: 'com.jfrog.artifactory'
  apply plugin: 'idea'
  apply plugin: 'application'
  apply plugin: 'propdeps'
  apply plugin: 'propdeps-maven'
  apply plugin: 'propdeps-idea'
  apply plugin: 'propdeps-eclipse'
  
  
  ...
  
  
  dependencies {
     compile('org.springframework.boot:spring-boot-starter-web')
     compile("org.springframework.boot:spring-boot-starter-thymeleaf")
     compile("org.springframework.boot:spring-boot-starter-jetty")
     compile("org.springframework.boot:spring-boot-starter-actuator")
     compile("org.springframework.boot:spring-boot-starter-redis")
     compile("org.springframework.boot:spring-boot-devtools")
  }
  </code></pre>
  
  <p>Project executed with: <code>gradle :web-admin:bootRun</code></p>
  
  <p><strong>Update/Answer:</strong> </p>
  
  <p>After some surfing in internet and reading spring-boot docs I found one trick. 
  Problem in using <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/build-tool-plugins-gradle-plugin.html#build-tool-plugins-gradle-running-applications" rel="nofollow"><code>devtools</code> together with <code>spring-boot-gradle-plugin</code></a> as a result I simply need to add to my <strong>gradle.build</strong> file few lines: </p>
  
  <pre><code>    // Used by 'Spring Boot Gradle Plugin' in combination with 'Devtools' makes HTML/JS/CSS reloadable.
      bootRun {
          addResources = true
      }
  </code></pre>