Spring Boot add HTML and JavaScript

后端 未结 7 798
天命终不由人
天命终不由人 2020-12-24 08:50

I\'m trying to run Spring boot app with some HTML5 and JavaScript and I have a problem.

I have project structure like this:

My Spring MVC Controller

相关标签:
7条回答
  • 2020-12-24 09:40

    just for anyone to find this page with the same issue. The way I resolved the 'script is not executed' problem was pretty simple.

    Simply replaced :

    <script type="text/javascript" src="js/src/Test.js" />
    

    with

    <script type="text/javascript" src="js/src/Test.js" ></script>
    

    (Test is located in 'static/js/src') Hopefully this is helpful to anyone but me :)

    cheers

    0 讨论(0)
提交回复
热议问题