title: Context Path and static content | Spring Boot
body: <p>I am trying to port my application to Spring boot and things are working fine for me. I am facing issue with static content and contextPath. I have added following property in my <code>application.properties</code></p>
  
  <pre><code>server.contextPath=/sm-admin
  </code></pre>
  
  <p>before this, I was referring to my static contents by</p>
  
  <pre><code>&lt;script src="/plugins/jQuery/jquery-2.2.3.min.js"&gt;&lt;/script&gt;
  &lt;script src="/bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>but with addition of <code>contextPath</code>, above configuration is no longer working and I have following way</p>
  
  <p>Change static content references to</p>
  
  <pre><code> &lt;script src="../plugins/jQuery/jquery-2.2.3.min.js"&gt;&lt;/script&gt;
   &lt;script src="../bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Or</p>
  
  
  
  
  
  <p>I believe there should be some way to handle it using application.properties file but I am unable to find such configuration. Can some on point me to right direction. </p>