The problem is that the script does not connect to my html page. I use Spring boot 1.5.10
Project window:
Content index.html:
<!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> </head> <body> <p>Начало документа</p> <p>Конец документа</p> </body> <script src="../public/js/script.js"></script> </html> I tried to replace src = "../ public / js / index.js" with th: src = "@ {../ public / js / index.js} , but still the script is not executed.
index.js contains an alert ('JS подключен и отлично работает!');
The browser complains about GET http://localhost:8080/public/script.js net::ERR_ABORTED 
I tried to upload the script.js file to the templates folder, specify src="script.js" or src="/script.js" , but still the error is the same.
How to solve this problem?

/public/js/script.js. But there is a path/public.js/script.js- Stepan Kasyanenko