I am triying to understand why my SpringBoot webApp doesn't render in the browser. This is what my debug log says:

```
2017-08-04 14:54:24.760 DEBUG 23863 --- [tp1027569178-15] o.s.w.servlet.view.InternalResourceView  : Forwarding to resource [/views/tictactoe.html] in InternalResourceView 'tictactoe'
2017-08-04 14:54:24.762 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/views/tictactoe.html]
2017-08-04 14:54:24.766 DEBUG 23863 --- [tp1027569178-15] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /views/tictactoe.html
2017-08-04 14:54:24.768 DEBUG 23863 --- [tp1027569178-15] s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/views/tictactoe.html]
2017-08-04 14:54:24.768 DEBUG 23863 --- [tp1027569178-15] o.s.w.s.handler.SimpleUrlHandlerMapping  : Matching patterns for request [/views/tictactoe.html] are [/**]
2017-08-04 14:54:24.770 DEBUG 23863 --- [tp1027569178-15] o.s.w.s.handler.SimpleUrlHandlerMapping  : URI Template variables for request [/views/tictactoe.html] are {}
2017-08-04 14:54:24.771 DEBUG 23863 --- [tp1027569178-15] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapping [/views/tictactoe.html] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@47b52f9] and 1 interceptor
2017-08-04 14:54:24.771 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/views/tictactoe.html] is: -1
2017-08-04 14:54:24.772 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2017-08-04 14:54:24.777 DEBUG 23863 --- [tp1027569178-15] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
2017-08-04 14:54:24.778 DEBUG 23863 --- [tp1027569178-15] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)]
2017-08-04 14:54:24.778 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/error] is: -1
2017-08-04 14:54:24.784 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Rendering view [org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$SpelView@41ee3720] in DispatcherServlet with name 'dispatcherServlet'
2017-08-04 14:54:24.795 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-04 14:54:24.802 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-04 14:54:24.802 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-04 14:54:24.804 DEBUG 23863 --- [tp1027569178-15] o.s.web.servlet.DispatcherServlet        : Successfully completed request

```

I am not sure if my directory structure its correct. This is how it looks like: [![enter image description here](https://i.stack.imgur.com/TObYX.png)](https://i.stack.imgur.com/TObYX.png)

```
enter code here

```

Maybe something wrong in my web page/angular?

```
<!DOCTYPE html>
<html ng-app="myApp" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
    <title>TicTacToe</title>
    <link type="text/css" href="css/design.css" rel="stylesheet" />
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.js"></script>
    <script src="js/tictactoe.js"></script>

</head>
<body ng-controller="displayPageController">
<div id="player-1">PLAYER 1<br/>
    {{gameBoardDto.player1}}<span style="display:inline-block"/>
</div>
<div id="game">

    <div id="top-left" ng-click='playPage("topleft")'>{{gameBoardDto.topleft}}<span style="display:inline-block"/></div>
    <div id="top" ng-click='playPage("top")'>{{gameBoardDto.top}}<span style="display:inline-block"/></div>
    <div id="top-right" ng-click='playPage("topright")'>{{gameBoardDto.topright}}<span style="display:inline-block"/></div>
    <div id="left" ng-click='playPage("left")'>{{gameBoardDto.left}}<span style="display:inline-block"/></div>
    <div id="middle" ng-click='playPage("middle")'>{{gameBoardDto.middle}}<span style="display:inline-block"/></div>
    <div id="right" ng-click='playPage("right")'>{{gameBoardDto.right}}<span style="display:inline-block"/></div>
    <div id="bottom-left" ng-click='playPage("bottomleft")'>{{gameBoardDto.bottomleft}}<span style="display:inline-block"/></div>
    <div id="bottom" ng-click='playPage("bottom")'>{{gameBoardDto.bottom}}<span style="display:inline-block"/></div>
    <div id="bottom-right" ng-click='playPage("bottomright")'>{{gameBoardDto.bottomright}}<span style="display:inline-block"/></div>
</div>
<div id="player-2">PLAYER 2<br/>
    {{gameBoardDto.player2}}<span style="display:inline-block"/>
</div>
</body>
</html>

```

This is my Spring MVC conf:
package application;

```
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

@Configuration
@EnableWebMvc
public class MvcConfiguration extends WebMvcConfigurerAdapter {
    //This allows html pages to be resolved
    @Bean
    public ViewResolver getViewResolver() {
        InternalResourceViewResolver resolver = new InternalResourceViewResolver();
        resolver.setPrefix("/views/");
        resolver.setSuffix(".html");
        return resolver;
    }
    /*
    This allows resources such as .js .css etc to be resolved
    Here an example of how the views are linked to the resources
    <link rel="stylesheet" type="text/css" href="resources/css/design.css"/>
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
    }

    @Override
    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }
}

```

Any idea how can I fix this issue? My browser just renders an error when I try to access:

[![enter image description here](https://i.stack.imgur.com/Zn27x.png)](https://i.stack.imgur.com/Zn27x.png)

**update**
I did as Andy Wilkinson suggested but didn't really work but I did some modifications and now I have the page being served but the javascript not working.

This is what I did:
 - I deleted the `@EnableWebMvc` from `MvcConfiguration`
 - Removed addResourceHandlers and configureDefaultServletHandling from MvcConfiguration
 - Removed ViewResolver @Bean method from MvcConfiguration
 - I added a dependency to `compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'`
 - I created a directory called templates and I moved the .html files there

Now the browser shows me this:

```
[![enter code here][3]][3]

```

This is what the log outputs:

```
017-08-06 13:58:54.397 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2017-08-06 13:58:54.402 DEBUG 17581 --- [qtp758944736-19] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/error] is: -1
2017-08-06 13:58:54.402 DEBUG 17581 --- [qtp758944736-18] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
2017-08-06 13:58:54.403 DEBUG 17581 --- [qtp758944736-18] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)]
2017-08-06 13:58:54.403 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/error] is: -1
2017-08-06 13:58:54.508 DEBUG 17581 --- [qtp758944736-18] o.s.w.s.m.m.a.HttpEntityMethodProcessor  : Written [{timestamp=Sun Aug 06 13:58:54 BST 2017, status=404, error=Not Found, message=Not Found, path=/resources/css/design.css}] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@15adc6be]
2017-08-06 13:58:54.508 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.508 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-06 13:58:54.509 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.509 DEBUG 17581 --- [qtp758944736-18] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-06 13:58:54.510 DEBUG 17581 --- [qtp758944736-19] o.s.w.s.m.m.a.HttpEntityMethodProcessor  : Written [{timestamp=Sun Aug 06 13:58:54 BST 2017, status=404, error=Not Found, message=Not Found, path=/resources/javascript/tictactoe.js}] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@15adc6be]
2017-08-06 13:58:54.511 DEBUG 17581 --- [qtp758944736-19] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.511 DEBUG 17581 --- [qtp758944736-19] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-06 13:58:54.511 DEBUG 17581 --- [qtp758944736-19] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.511 DEBUG 17581 --- [qtp758944736-19] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-06 13:58:54.700 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/resources/javascript/tictactoe.js]
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /resources/javascript/tictactoe.js
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] s.w.s.m.m.a.RequestMappingHandlerMapping : Did not find handler method for [/resources/javascript/tictactoe.js]
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] o.s.w.s.handler.SimpleUrlHandlerMapping  : Matching patterns for request [/resources/javascript/tictactoe.js] are [/**]
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] o.s.w.s.handler.SimpleUrlHandlerMapping  : URI Template variables for request [/resources/javascript/tictactoe.js] are {}
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapping [/resources/javascript/tictactoe.js] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/], class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@453002f1]]] and 1 interceptor
2017-08-06 13:58:54.701 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/resources/javascript/tictactoe.js] is: -1
2017-08-06 13:58:54.702 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : DispatcherServlet with name 'dispatcherServlet' processing GET request for [/error]
2017-08-06 13:58:54.703 DEBUG 17581 --- [qtp758944736-21] s.w.s.m.m.a.RequestMappingHandlerMapping : Looking up handler method for path /error
2017-08-06 13:58:54.704 DEBUG 17581 --- [qtp758944736-21] s.w.s.m.m.a.RequestMappingHandlerMapping : Returning handler method [public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)]
2017-08-06 13:58:54.704 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Last-Modified value for [/error] is: -1
2017-08-06 13:58:54.711 DEBUG 17581 --- [qtp758944736-21] o.s.w.s.m.m.a.HttpEntityMethodProcessor  : Written [{timestamp=Sun Aug 06 13:58:54 BST 2017, status=404, error=Not Found, message=Not Found, path=/resources/javascript/tictactoe.js}] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@15adc6be]
2017-08-06 13:58:54.711 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.711 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Successfully completed request
2017-08-06 13:58:54.711 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling
2017-08-06 13:58:54.711 DEBUG 17581 --- [qtp758944736-21] o.s.web.servlet.DispatcherServlet        : Successfully completed request

```

This is the project if somebody wants to have a look:
<https://github.com/SFRJ/tictactoe(Note>: The version in github works when running with gradlew but not running from the .jar)