title: Hot Reloading Thymeleaf Templates and Resource Bundles in Spring Boot 2.1
body: <p>I created a Spring Boot 2.1.3 application with i18n enabled, added devtools, and installed the Firefox LiveReload extension. Unfortunately, when I change my Thymeleaf templates or i18n messages, it doesn't change. The <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html#using-boot-devtools-property-defaults" rel="nofollow noreferrer">Spring Boot documentation</a> seems to suggest all you need to do is install devtools, and it'll disable caching of static resources. </p>
  
  <p>Here's what I did to create my app:</p>
  
  <pre><code>mkdir bootiful-i18n
  cd bootiful-i18n
  http https://start.spring.io/starter.zip dependencies==web,thymeleaf -d | tar xvz
  </code></pre>
  
  <p>Then I created a <code>HomeController.java</code>:</p>
  
  <pre><code>package com.example.demo;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.GetMapping;
  
  @Controller
  public class HomeController {
  
     @GetMapping("/")
     String home() {
         return "home";
     }
  }
  </code></pre>
  
  <p>I created a Thymeleaf template at <code>src/main/resources/templates/home.html</code>:</p>
  
  <pre><code>&lt;html xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;body&gt;
     &lt;h1 th:text="#{title}"&gt;&lt;/h1&gt;
     &lt;p th:text="#{message}"&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I added a <code>messages.properties</code> file in <code>src/main/resources</code>:</p>
  
  <pre><code>title=Welcome
  message=Hello! I hope you're having a great day.
  </code></pre>
  
  <p>This all works great. To enable hot-reload, I added devtools to <code>pom.xml</code>:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>And installed the <a href="https://addons.mozilla.org/en-US/firefox/addon/livereload-web-extension/" rel="nofollow noreferrer">LiveReload extension for Firefox</a>.</p>
  
  <p>I restarted my server, enabled LiveReload and navigated to <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a>. I tried changing and saving both <code>home.html</code> and <code>messages.properties</code> and refreshing my browser. The output in the browser does not change. Is there something else I need to do to disable caching of Thymeleaf templates and message bundles in Spring Boot 2.1?</p>