title: Spring Boot Application Error
body: <p>I am doing my first project with Spring Boot. I am getting the below error which I do not have clue about.Am I missing any dependency in build.gradle shown below?I am getting the error when I am running the Application.java file.</p>
  
  <pre><code>    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at com.bale.route.Application.main(Application.java:12) [classes/:na]
      Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]
          ... 8 common frames omitted
  </code></pre>
  
  <p>Below are my configuration files.</p>
  
  <pre><code>    **//Application.java**
  
          package com.test.route;
  
          import org.springframework.boot.SpringApplication;
  
          import org.springframework.boot.autoconfigure.SpringBootApplication;
          import org.springframework.boot.builder.SpringApplicationBuilder;
          import org.springframework.boot.context.web.SpringBootServletInitializer;
  
          @SpringBootApplication
          public class Application extends SpringBootServletInitializer{
  
              public static void main(String[] args) {
                  SpringApplication.run(Application.class, args);
              }
              protected SpringApplicationBuilder configure(
  
                      SpringApplicationBuilder application) {
  
                  return application.sources
  
      (Application.class);
  
          }
      }
  </code></pre>
  
  <p><strong>//build.gradle</strong></p>
  
  <pre><code>    buildscript {
          repositories {
              mavenCentral()
          }
          dependencies {
              classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.3.RELEASE")
          }
      }
      apply plugin: 'war'
      apply plugin: 'java'
      apply plugin: 'spring-boot'
  
  
  
      repositories {
          mavenCentral()
      }
  
      sourceCompatibility = 1.7
      targetCompatibility = 1.7
  
      dependencies {
           compile("org.springframework.boot:spring-boot-starter-web")
           {
  
              exclude module: 'spring-boot-starter-tomcat'
  
  
          }
  
  
  
          // tag::actuator[]
          //compile("org.springframework.boot:spring-boot-starter-actuator")
          compile("org.apache.tomcat.embed:tomcat-embed-core")
          // end::actuator[]
          // tag::tests[]
          //testCompile("org.springframework.boot:spring-boot-starter-test")
          // end::tests[]
      }
  
      task wrapper(type: Wrapper) {
          gradleVersion = '2.3'
      }
  </code></pre>
  
  <p><strong>//application.properties</strong></p>
  
  <pre><code>    server.servlet-path= /app
      logging.level.org.springframework=DEBUG
      spring.mvc.view.prefix=/WEB-INF/jsp/
      spring.mvc.view.suffix=.jsp
      cookie.path=
      cookie.domain=
  </code></pre>
  
  <p>What am I missing in my configuration?</p>