0

I just study vue.js and my problem is: if I open index.html then index.js open too, but if I start srping boot, my index.html works correct and doesn't see index.js.
path

<body>
    <div id="armors"></div>
    <script type="text/javascript" src="js/index.js"></script>
</body>
ravibagul91
  • 20,072
  • 5
  • 36
  • 59
Hayami Pysh
  • 285
  • 1
  • 5
  • 14
  • Every time you open the *index.html* file with your browser, a new window opens in your browser which shows the content of your *index.js* file ? – Trunk May 31 '19 at 11:02
  • if i open only index.html file, without spring boot, vue components inject from index.js to index.html. it's ok. but with deploy application in spring boot it doesn't work. i get an error like GET http://localhost:8080/js/index.js net::ERR_ABORTED 404. it's somthing about path problems, but i move index.js in different place and it doesn't work – Hayami Pysh May 31 '19 at 11:23
  • I haven't really worked on spring, but I believe static assets(like js files) should be moved to a static directory. Here is a similar [question](https://stackoverflow.com/questions/33925712/spring-boot-add-html-and-javascript) – Stephen S May 31 '19 at 11:50

0 Answers0