title: how to bundle angular code into spring mvc as single app
body: <p>I followed this <a href="https://stackoverflow.com/questions/42143221/run-spring4mvc-with-angular-2-on-a-single-server/42613222#42613222">thread</a> to integrate my angular app dist build folder content into webcontent folder of java and change basehref = &quot;./&quot; in index.html</p>
  <p>index.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot;&gt;
    &lt;title&gt;Mavenangular&lt;/title&gt;
    &lt;base href=&quot;./&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
    &lt;link rel=&quot;icon&quot; type=&quot;image/x-icon&quot; href=&quot;favicon.ico&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.ef46db3751d8e999.css&quot;&gt;&lt;/head&gt;
  &lt;body&gt;
    &lt;app-root&gt;&lt;/app-root&gt;
  &lt;script src=&quot;runtime.9da74ff681823805.js&quot; type=&quot;module&quot;&gt;&lt;/script&gt;&lt;script src=&quot;polyfills.dde9cc843d881ec9.js&quot; type=&quot;module&quot;&gt;&lt;/script&gt;&lt;script src=&quot;main.76aa31324ce9187e.js&quot; type=&quot;module&quot;&gt;&lt;/script&gt;
  
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Ca562.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ca562.png" alt="enter image description here" /></a></p>
  <p>But when i run the app with tomcat server it show
  <a href="https://i.stack.imgur.com/lbgK5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lbgK5.png" alt="enter image description here" /></a></p>
  <p>Is there any configuration that i need to edit ? I integrated succesfully with spring boot but i got stuck with old spring mvc
  Thank you</p>