title: Spring Boot + Thymeleaf not finding message properties
body: <p>I am trying to create a web application using Spring Boot and Thymeleaf and am having trouble getting the template to use the messages defined in a properties file. Instead of the message defined in the properties file, it is instead showing <code>??form.welcome_en_GB??</code> The console isn't logging any errors.</p>
  
  <p>The project structure is like this</p>
  
  <pre><code>──┬  src
    │   └───  main
    │       ├───  java
    │       │   └───  com
    │       │       └───  package
    │       │           ├───  controller
    │       │           │   └─── FormController.java
    │       │           ├─── Application.java
    │       │           └─── ServletInitializer.java
    │       └───  resources
    │           ├───  static
    │           │   └─── home.html
    │           ├───  templates
    │           │   ├─── form.html
    │           │   └─── form.properties
    │           └─── application.properties
    └─── pom.xml
  </code></pre>
  
  <p>Application.java</p>
  
  <pre><code>@SpringBootApplication
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>ServletInitializer.java</p>
  
  <pre><code>public class ServletInitializer extends SpringBootServletInitializer {
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(Application.class);
      }
  }
  </code></pre>
  
  <p>FormController.java</p>
  
  <pre><code>@Controller
  @RequestMapping("/form")
  public class FormController {
      private static final Logger log = LoggerFactory.getLogger(FormController.class);
  
      @RequestMapping(value = "/new", method = RequestMethod.GET)
      public ModelAndView getNewReportForm() {
          log.info("New form requested");
          ModelAndView mav = new ModelAndView("form");
          return mav;
      }
  }
  </code></pre>
  
  <p>form.html</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"&gt;
  &lt;head&gt;
      &lt;title&gt;Form&lt;/title&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;
      &lt;link rel="stylesheet" type="text/css" media="all"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p th:text="#{form.welcome}"&gt;Welcome!&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>form.properties</p>
  
  <pre><code>form.welcome=Hello there!
  </code></pre>