title: How to run this with out spring boot
body: <p>I am new to spring and maven, i do have this app which is referring from, <a href="https://spring.io/guides/gs/rest-service/" rel="nofollow">https://spring.io/guides/gs/rest-service/</a>
  I am using spring + maven.</p>
  
  <p>I need to get the output into a simple html via tomcat, currently it is using embedded Apache Tomcat 7.</p>
  
  <pre><code>    package hello;
  
  public class Greeting {
  
      private final long id;
      private final String content;
  
      public Greeting(long id, String content) {
          this.id = id;
          this.content = content;
      }
  
      public long getId() {
          return id;
      }
  
      public String getContent() {
          return content;
      }
  }
  
  
  package hello;
  
  import java.util.concurrent.atomic.AtomicLong;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  import org.springframework.web.bind.annotation.RestController;
  
  @RestController
  public class GreetingController {
  
      private static final String template = "Hello, %s!";
      private final AtomicLong counter = new AtomicLong();
  
      @RequestMapping("/greeting")
      public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
          return new Greeting(counter.incrementAndGet(),
                              String.format(template, name));
      }
  }
  </code></pre>
  
  <p>This is the main which uses spring boot, to run in embedded Apache. </p>
  
  <pre><code>    package hello;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class Application {
  
      public static void main(String[] args) {
          SpringApplication.run(Application.class, args);
      }
  }
  </code></pre>
  
  <p>Can someone help me with this! What i need is simple web service without embedded tomcat. just need normal tomcat deploying.  </p>
  
  <p>pom.xml is as bellow. </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;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;gs-rest-service&lt;/artifactId&gt;
      &lt;version&gt;0.1.0&lt;/version&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.3.2.RELEASE&lt;/version&gt;
      &lt;/parent&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;/dependencies&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&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;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  &lt;/project&gt;
  </code></pre>