title: InternalResourceViewResolver not resolving views properly
body: <p>I have no idea what we're doing wrong here. I'm trying to set up a single page Spring MVC project so I can look into things. I have a single screen, <code>greeting.html</code> that I'm trying to load. Here's my controller class to load it:</p>
  
  <pre><code>@Controller
  public class GreetingController {
  
      @GetMapping("/greeting")
      public String getGreeeting(@RequestParam(name="name", required=false, defaultValue="World") String name, Model model) {
          model.addAttribute("name", name);
  
          return "greeting";
      }
  
  }
  </code></pre>
  
  <p>This works fine when <code>greeting.html</code> is in <code>/resources/templates/greeeting.html</code>. However, I'd like it behind a <code>WEB-INF</code> folder. I've tried placing it in <code>WEB-INF/views/greeting.html</code> and <code>webapp/WEB-INF/views/greeting.html</code>. I then try and use an <code>InternalResourceViewResolver</code> as I've read online:</p>
  
  <pre><code>@Bean
  public InternalResourceViewResolver viewResolver() {
      InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
      viewResolver.setPrefix("/WEB-INF/views/");
      viewResolver.setSuffix(".html");
  
      return viewResolver;
  }
  </code></pre>
  
  <p>From my understanding, this should allow it to find <code>greeting.html</code> behind one of my WEB-INF folder setups. However, when I go to <code>localhost:8080/greeting</code>, I get a 404 along with the following message in the console: </p>
  
  <p><code>WARN 1439 --- [nio-8080-exec-1] o.s.w.s.r.ResourceHttpRequestHandler     : Path with "WEB-INF" or "META-INF": [WEB-INF/views/greeting.html]</code></p>
  
  <p>I'm at a complete loss as to what's even going on or how to fix it, every single tutorial online does this exact thing and has no problems, I can't seem to find anyone online with this same issue. Any guidance at all would be helpful here.</p>