Spring Boot “Request processing failed” dispatcherServlet

I am new at Spring boot and trying to learn with tutorial. And I have a problem.

And I receive :

Servlet.service() for servlet [dispatcheremphasized textServlet] in
context
with path [] threw exception [Request processing failed; nested exception is
java.lang.RuntimeException: ] with root cause

<!DOCTYPE html>
<html lang="en">
    <body>
    	I'm a 5xx
    </body>
</html>

main.css

h1{
	color:#0000FF;
}

h2{
	color:#FF0000;
}

footer.html

<!--  this is footer -->
</html>

header.html

<!DOCTYPE HTML>
<head>

<title>{{title}}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<link rel="stylesheet" type="text/css" target="_blank" rel="nofollow" href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" target="_blank" rel="nofollow" href="css/main.css" />

</head>
<!--  this is header -->

error.html

<!DOCTYPE html>

<html lang="en">

<body>
	Something went wrong: {{status}} {{error}}
</body>

</html>

welcome.html

MustacheApplication.java

    package com.example;

    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;

    @SpringBootApplication
    public class MustacheApplication {

    public static void main(String[] args) {
    SpringApplication.run(MustacheApplication.class, args);
   }
   }

WelcomeController.java

   package com.example;

   import java.util.Map;

   import org.springframework.beans.factory.annotation.Value;
   import org.springframework.stereotype.Controller;
   import org.springframework.web.bind.annotation.RequestMapping;

   @Controller
   public class WelcomeController {

   // inject via application.properties
    @Value("${app.welcome.message}")
    private String MESSAGE = "";

    @Value("${app.welcome.title}")
    private String TITLE = "";

    @RequestMapping("/")
    public String welcome(Map<String, Object> model) {
        model.put("title", TITLE);
        model.put("message", MESSAGE);
        return "welcome";
    }

    // test 5xx errors
    @RequestMapping("/5xx")
    public String ServiceUnavailable() {
        throw new RuntimeException("");
    }

}

MustacheApplicationTests.java

package com.example;

import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@DirtiesContext
  public class MustacheApplicationTests {

@Autowired
private TestRestTemplate restTemplate;

    @Test
    public void testMainPage() throws Exception {

    ResponseEntity<String> entity = this.restTemplate.getForEntity("/", 
    String.class);
    assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
    assertThat(entity.getBody()).contains("Hello Mkyong");

    }

    @Test
    public void test404Page() throws Exception {

    HttpHeaders headers = new HttpHeaders();
    headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
    HttpEntity<String> requestEntity = new HttpEntity<String>(headers);
    ResponseEntity<String> responseEntity = this.restTemplate.exchange
    ("/uri-not-exist", HttpMethod.GET,requestEntity, String.class);
    assertThat(responseEntity.getStatusCode()).
    isEqualTo(HttpStatus.NOT_FOUND);
    assertThat(responseEntity.getBody()).
    contains("Something went wrong: 404 Not Found");

    }
    @Test
    public void test5xxPage() throws Exception {

    HttpHeaders headers = new HttpHeaders();
    headers.setAccept(Arrays.asList(MediaType.TEXT_HTML));
    HttpEntity<String> requestEntity = new HttpEntity<String>(headers);
    ResponseEntity<String> responseEntity = this.restTemplate.exchange
    ("/5xx", HttpMethod.GET, requestEntity,String.class);
    assertThat(responseEntity.getStatusCode()).
    isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
    assertThat(responseEntity.getBody()).contains("I'm a 5xx");

}

}

pom.xml

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/xsd/maven-4.0.0.xsd”>
4.0.0

<artifactId>Mustache</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Mustache</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.6.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>



<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

Ref internet

Spring Boot Hello World Example – Mustache

enter image description here

Console

Spring Boot :: (v1.5.6.RELEASE)

2017-08-07 15:44:57.760 INFO 3096 — [ main] com.example.MustacheApplication : Starting MustacheApplication on STARWAY-PC2 with PID 3096 (C:/Users/starway/workspace/Mustache/target/classes started by starway in C:/Users/starway/workspace/Mustache)
2017-08-07 15:44:57.762 INFO 3096 — [ main] com.example.MustacheApplication : No active profile set, falling back to default profiles: default
2017-08-07 15:44:57.808 INFO 3096 — [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1d548a08: startup date [Mon Aug 07 15:44:57 CST 2017]; root of context hierarchy
2017-08-07 15:44:58.883 INFO 3096 — [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-08-07 15:44:58.891 INFO 3096 — [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-08-07 15:44:58.892 INFO 3096 — [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.16
2017-08-07 15:44:58.962 INFO 3096 — [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-08-07 15:44:58.962 INFO 3096 — [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1156 ms
2017-08-07 15:44:59.059 INFO 3096 — [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: ‘dispatcherServlet’ to [/]
2017-08-07 15:44:59.062 INFO 3096 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘characterEncodingFilter’ to: [/]
2017-08-07 15:44:59.063 INFO 3096 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘hiddenHttpMethodFilter’ to: [/
]
2017-08-07 15:44:59.063 INFO 3096 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘httpPutFormContentFilter’ to: [/]
2017-08-07 15:44:59.063 INFO 3096 — [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘requestContextFilter’ to: [/
]
2017-08-07 15:44:59.280 INFO 3096 — [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1d548a08: startup date [Mon Aug 07 15:44:57 CST 2017]; root of context hierarchy
2017-08-07 15:44:59.325 INFO 3096 — [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped “{[/5xx]}” onto public java.lang.String com.example.WelcomeController.ServiceUnavailable()
2017-08-07 15:44:59.326 INFO 3096 — [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped “{[/]}” onto public java.lang.String com.example.WelcomeController.welcome(java.util.Map)
2017-08-07 15:44:59.328 INFO 3096 — [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped “{[/error]}” onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-08-07 15:44:59.328 INFO 3096 — [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped “{[/error],produces=[text/html]}” onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-08-07 15:44:59.347 INFO 3096 — [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-07 15:44:59.347 INFO 3096 — [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/
] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-07 15:44:59.372 INFO 3096 — [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-08-07 15:44:59.468 INFO 3096 — [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-08-07 15:44:59.509 INFO 3096 — [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-08-07 15:44:59.512 INFO 3096 — [ main] com.example.MustacheApplication : Started MustacheApplication in 1.934 seconds (JVM running for 2.37)
2017-08-07 15:45:22.659 INFO 3096 — [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet ‘dispatcherServlet’
2017-08-07 15:45:22.660 INFO 3096 — [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet ‘dispatcherServlet’: initialization started
2017-08-07 15:45:22.672 INFO 3096 — [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet ‘dispatcherServlet’: initialization completed in 12 ms
2017-08-07 15:45:29.763 ERROR 3096 — [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: ] with root cause