title: Spring Boot jar cannot find index.html
body: <p>I have Spring boot webapp running from jar. Spring boot for some reason cannot find <code>src/mai/webapp/index.html</code> and returns <code>There was an unexpected error (type=Not Found, status=404).</code> </p>
  
  <pre><code>@Configuration
  @EnableWebMvc
  public class WebMvcConfig extends WebMvcConfigurerAdapter {
      @Override
      public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer){
          configurer.enable();
      }
      @Bean
      public InternalResourceViewResolver viewResolver(){
          InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
          viewResolver.setPrefix("WEB-INF/pages");
          viewResolver.setSuffix(".jsp");
          return viewResolver;
      }
  
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
          registry.addResourceHandler("/**").addResourceLocations("/");
      }
  
  }
  </code></pre>