0

I have a basic spring boot project structure, in resources this is my folder structure:

resources
-> templates
--> static
---> post.js
-> recover.html

In my recover html:

<script type="text/javascript" th:src="@{static/post.js}" ></script>

but content still not loading cause this is not the right path. I've read other similar questions, but I still not understand how to select the right path to post.js

1
  • maybe a duplicate but other answers didn't solve my problem Commented May 15, 2019 at 10:20

1 Answer 1

0

you should follow this structor:

-resources
    --static
        ---post.js 

    --templates

and script src:

<script th:src="@{/post.js}" type="text/javascript"></script>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.