title: Spring-boot inbuilt tomcat server not starting
body: <p>I am building a very basic spring-boot service using the inbuild tomcat server.</p>
  
  <p>Pom looks like this :</p>
  
  <pre><code>&lt;groupId&gt;com.example&lt;/groupId&gt;
  &lt;artifactId&gt;demo&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;demo&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.7.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!--&lt;dependency&gt;
          &lt;groupId&gt;org.flywaydb&lt;/groupId&gt;
          &lt;artifactId&gt;flyway-core&lt;/artifactId&gt;
      &lt;/dependency&gt;--&gt;
      &lt;!--&lt;dependency&gt;--&gt;
          &lt;!--&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;--&gt;
          &lt;!--&lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;--&gt;
      &lt;!--&lt;/dependency&gt;--&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-validation&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
          &lt;artifactId&gt;lombok&lt;/artifactId&gt;
          &lt;optional&gt;true&lt;/optional&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
          &lt;artifactId&gt;spring-restdocs-mockmvc&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;!--&lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;--&gt;
  
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>I am setting the port in the <code>application.properties</code> file as <code>server.port=8089</code>. There is one Ping URI added in the controller class as :</p>
  
  <pre><code>@RequestMapping("/ping")
  @RestController
  public class helloController {
  
      @RequestMapping(method= RequestMethod.GET,produces = {MediaType.APPLICATION_JSON_VALUE})
      public ResponseEntity&lt;String&gt; ping(){
          return new ResponseEntity&lt;&gt;("Hello World Spring-boot app", HttpStatus.OK);
      }
  </code></pre>
  
  <p>When I do a <code>mvn clean package</code> everything works fine and the build is a success. But when I run the application from the <code>Main()</code> this is what the log looks like :</p>
  
  <pre><code>2017-09-19 10:37:32.219  INFO 6436 --- [           main] com.example.demo.DemoApplication         : No active profile set, falling back to default profiles: default
  2017-09-19 10:37:32.290  INFO 6436 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@77f99a05: startup date [Tue Sep 19 10:37:32 PDT 2017]; root of context hierarchy
  2017-09-19 10:37:33.782  INFO 6436 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  2017-09-19 10:37:33.802  INFO 6436 --- [           main] com.example.demo.DemoApplication         : Started DemoApplication in 2.043 seconds (JVM running for 2.802)
  2017-09-19 10:37:33.802  INFO 6436 --- [       Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@77f99a05: startup date [Tue Sep 19 10:37:32 PDT 2017]; root of context hierarchy
  2017-09-19 10:37:33.802  INFO 6436 --- [       Thread-2] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
  </code></pre>
  
  <p>The log is not showing what port the service is starting .</p>
  
  <p>What else is to be done to start the service on the designated port and to keep the server up an running?</p>