I recently added some bootstrap templates to my resources/templates folder. However, when I start the server and navigate to the URL where I linked the index.html page, the bootstrap styling is not loading. Surprisingly, when I use the Chrome button in IntelliJ to view the HTML file, everything works fine with the bootstrap styles loading perfectly.
Here's an example from my index.html file:
<link rel="stylesheet" href="bootstrap.css">
https://i.sstatic.net/ss3C9.png
In this image link above, you can see that both the index.html and bootstrap.css files are located in the same folder. So why am I encountering an error when I launch the Spring app and visit the URL, resulting in the following message:
GET http://localhost:8080/bootstrap.css net::ERR_ABORTED 404
The error seems to be occurring at line 14, which corresponds to:
<link rel="stylesheet" href="bootstrap.css">