title: Spring Boot unable to resolve Freemarker view
body: <p>I am attempting to get Freemarker views displaying with Spring Boot for the first time, and currently get the following error in the browser:</p>
  
  <blockquote>
    <p>Whitelabel Error Page</p>
    
    <p>This application has no explicit mapping for /error, so you are seeing
    this as a fallback.</p>
    
    <p>Sun Feb 19 17:59:07 GMT 2017 There was an unexpected error (type=Not
    Found, status=404). No message available</p>
  </blockquote>
  
  <p>I am using Spring Boot 1.5.</p>
  
  <p>My file structure:</p>
  
  <p><a href="https://i.stack.imgur.com/TbPCm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TbPCm.png" alt="enter image description here"></a></p>
  
  <p>LoginController</p>
  
  <pre><code>package com.crm.controller;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  import com.crm.service.LoginService;
  
  @Controller
  public class LoginController {
  
      @Autowired
      private LoginService loginService;
  
      @RequestMapping("/login")
      public String authenticate() {
          return "loginPage";
      }
  }
  </code></pre>
  
  <p>application.properties</p>
  
  <pre><code>spring.freemarker.template-loader-path: /
  spring.freemarker.suffix: .ftl
  </code></pre>
  
  <p>Server</p>
  
  <pre><code>package com.crm;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class Server{
  
      public static void main(String[] args) {
          SpringApplication.run(Server.class, args);
      }
  }
  </code></pre>
  
  <p>Why is Spring unable to resolve the loginPage.ftl view? Why can't I see it in the web browser?</p>