title: Spring boot app vs .war file deployed on Tomcat/Jetty
body: <p>In my case let's consider a simple RESTful service created and configured with Spring Boot. This service communicates with a database (e.g. Postgres). </p>
  
  <p>What is a difference between:</p>
  
  <ul>
  <li>Building a Spring Boot <code>.jar</code> file and run it on my remote public host via <code>java -jar myservice.jar</code>?</li>
  </ul>
  
  <p>or</p>
  
  <ul>
  <li>Package it to <code>.war</code> file and deploy it on Tomcat/Jetty?</li>
  </ul>
  
  <p>First option seems to be a lot easier, u just need to run a <code>.jar</code>. In second option u need to create Tomcat instance, run it and then deploy a <code>.war</code> file.
  Is there any other difference? Any pros and cons of both method?</p>