0

I included .css and .js in my thymleaf like this :

<script src="/javascript/one.js"></script>
<script src="/javascript/two.js"></script>
<script src="/javascript/three.js"></script>

this error showing up in console

2016-07-24 21:08:05 WARN  PageNotFound:1149 - No mapping found for HTTP request with         URI [/javascript/one.js] in DispatcherServlet with name 'dispatcherServlet'
2016-07-24 21:08:05 DEBUG DispatcherServlet:997 - Successfully completed request

i dont know where i am missing

1
  • Where did you add the Javascript files in your Spring Boot project? They are normally in src/main/resources/static/. Things should work if you have them in a sub-directory javascript there. Commented Feb 24, 2022 at 7:43

1 Answer 1

1

in thymleaf you need add javascript source folder like this

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.