title: Manually launched Spring Boot application from .jar not working properly
body: <p>The problem is when I run .jar file(Spring Boot MVC app) from Intellij IDEA, application works fine, but when I try to run same file from the command line, template resolver cannot find template(.html) files. And this seems to be reasonable since when I opened .jar with file archiver I did not find any traces of that files. </p>
  
  <p>How Intellij make it work proper? And how can I do the same?
  My project structure:
  <a href="https://i.stack.imgur.com/6YCCT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6YCCT.png" alt="enter image description here"></a></p>
  
  <p>here they are, in '/templates' folder</p>
  
  <p>.jar file opened in archiver: </p>
  
  <p><a href="https://i.stack.imgur.com/0RRvb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0RRvb.png" alt="enter image description here"></a></p>
  
  <p>As I said, there is no .html files, so how Intellij add them when running .jar?</p>
  
  <p>pom.xml:</p>
  
  <pre><code>&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.vlad.pet.contactlist&lt;/groupId&gt;
    &lt;artifactId&gt;web-app&lt;/artifactId&gt;
    &lt;version&gt;1.0-ALPHA&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
  
    &lt;name&gt;web-app&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;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&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.6.RELEASE&lt;/version&gt;
    &lt;/parent&gt;
  
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.vlad.pet.contactlist&lt;/groupId&gt;
        &lt;artifactId&gt;model&lt;/artifactId&gt;
        &lt;version&gt;1.1-inmemory&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;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.thymeleaf.extras&lt;/groupId&gt;
        &lt;artifactId&gt;thymeleaf-extras-springsecurity4&lt;/artifactId&gt;
        &lt;version&gt;2.1.2.RELEASE&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;/project&gt;
  </code></pre>