title: Spring boot application not starting embedded tomcat
body: <p>Am newbie to Spring boot application. I have a task to create common crud repository which should be processed by rest controller. I just started with some example. But my application is not started the embedded tomcat. Also my rest controller URI are not mapping. This is maven module project and all the dependency are configured in parent maven. How to resolve this.</p>
  
  <p>Here is my code</p>
  
  <pre><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
   public class CRUDEngineApplication {
  
   public static void main(String[] args) {
       SpringApplication.run(CRUDEngineApplication.class, args);
   }
  }
  </code></pre>
  
  <p>Controller is</p>
  
  <pre><code>import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.RestController;
  
  import com.scm.services.CRUDEngineService;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  import org.springframework.http.HttpStatus;
  import org.springframework.http.ResponseEntity;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  @RestController("/api")
  public class CRUDEngineController {
  @Autowired
  private CRUDEngineService crudEngineService;
  
  public static final Logger logger = 
  LoggerFactory.getLogger(CRUDEngineController.class);
  
  
  /* public void setProductService(CRUDEngineService crudEngineService) {
      this.crudEngineService = crudEngineService;
  }*/
  @RequestMapping(value = "/user", method = RequestMethod.POST)
  public ResponseEntity&lt;?&gt; createUser(@RequestBody Object entity) {
      System.out.println("Check point entered.");
      crudEngineService.save(entity);
      return new ResponseEntity&lt;String&gt;( HttpStatus.CREATED);
  }
  }
  </code></pre>
  
  <p>Service interface is</p>
  
  <pre><code>import java.util.UUID;
  
  public interface CRUDEngineService {
  
  void save(Object entity);
  
  void delete(UUID id);
  }
  </code></pre>
  
  <p>Service implementation class is</p>
  
  <pre><code>import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  import com.scm.repositories.CRUDEngineRespository;
  import java.util.UUID;
  
  @Service
  public class CRUDEngineServiceImpl implements CRUDEngineService {
  
  @Autowired
  private CRUDEngineRespository productRepository;
  
  @Override
  public void save(Object entity) {
      productRepository.save(entity);
  }
  
  @Override
  public void delete(UUID id) {
      productRepository.delete(id);
  }
  }
  </code></pre>
  
  <p>And the crud repository implementation is</p>
  
  <pre><code>import java.util.UUID;
  import org.springframework.data.repository.CrudRepository;
  
  public interface CRUDEngineRespository extends CrudRepository&lt;Object, UUID&gt; 
  {
  
  }
  </code></pre>
  
  <p>Child pom.xml is</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
  http://maven.apache.org/xsd/maven-4.0.0.xsd" 
  xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
  &lt;groupId&gt;com.scm&lt;/groupId&gt;
  &lt;artifactId&gt;scm-parent&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;crudEngineService&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;crudEngineService&lt;/name&gt;
  &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  &lt;properties&gt;
  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;junit&lt;/groupId&gt;
    &lt;artifactId&gt;junit&lt;/artifactId&gt;
    &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Parent pom is</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
  http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;groupId&gt;com.scm&lt;/groupId&gt;
  &lt;artifactId&gt;scm-parent&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  
  &lt;name&gt;scm-parent&lt;/name&gt;
  &lt;description&gt;scm 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;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&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;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.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-cassandra&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
          &lt;version&gt;5.4.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &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;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  
  &lt;modules&gt;
      &lt;module&gt;userService&lt;/module&gt;
      &lt;module&gt;authenticationService&lt;/module&gt;
      &lt;module&gt;dataLayerService&lt;/module&gt;
      &lt;module&gt;uiService&lt;/module&gt;
      &lt;module&gt;crudEngineService&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p></p>
  
  <p>And the console result is</p>
  
  <pre><code>2017-10-07 13:03:32.348  INFO 6508 --- [           main] 
  c.s.configuration.CRUDEngineApplication  : Starting CRUDEngineApplication on 
  STS-STP-A808 with PID 6508 (started by muthuvignesh.k in E:\Septa_Bench\STS 
  Septa Repo\ppts_scm\scm-parent\crudEngineService)
  2017-10-07 13:03:32.350  INFO 6508 --- [           main] 
  c.s.configuration.CRUDEngineApplication  : No active profile set, falling 
  back to default profiles: default
  2017-10-07 13:03:32.378  INFO 6508 --- [           main] 
  s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4df828
  d7: startup date [Sat Oct 07 13:03:32 IST 2017]; root of context hierarchy
  2017-10-07 13:03:32.766  WARN 6508 --- [           main] 
  o.h.v.m.ParameterMessageInterpolator     : HV000184: 
  ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
  2017-10-07 13:03:32.872  WARN 6508 --- [           main] o.h.v.m.ParameterMessageInterpolator     : HV000184: ParameterMessageInterpolator has been chosen, EL interpolation will not be supported
  2017-10-07 13:03:33.052  INFO 6508 --- [           main] com.datastax.driver.core.Native          : Could not load JNR C Library, native system calls through this library will not be available (set this logger level to DEBUG to see the full stack trace).
  2017-10-07 13:03:33.052  INFO 6508 --- [           main] com.datastax.driver.core.ClockFactory    : Using java.lang.System clock to generate timestamps.
  2017-10-07 13:03:33.197  INFO 6508 --- [           main] com.datastax.driver.core.NettyUtil       : Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
  2017-10-07 13:03:33.541  INFO 6508 --- [           main] c.d.d.c.p.DCAwareRoundRobinPolicy        : Using data-center name 'datacenter1' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)
  2017-10-07 13:03:33.543  INFO 6508 --- [           main] com.datastax.driver.core.Cluster         : New Cassandra host /10.10.30.125:9042 added
  2017-10-07 13:03:33.795  INFO 6508 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  2017-10-07 13:03:33.804  INFO 6508 --- [           main] c.s.configuration.CRUDEngineApplication  : Started CRUDEngineApplication in 1.619 seconds (JVM running for 2.002)
  </code></pre>