Reputation: 1649
I want to save different css and js files in different subdirectories and this is my directory structure
Then I tried import all these files into my index.html file (which is mapped by "/") but none of them were imported properly. What should I configure to enable Spring boot to search for resources recursively in all subdirectories under "resources"? Also what should I do if I also want to put all html templates in subdirectories?
Upvotes: 0
Views: 1143
Reputation: 3850
You should remove the ../static/
as spring boot automatically expose all directories and sub-directories in the static folder on your main endpoint (default /
).
so for example use:
<script src="js/jquery-1.11.8.min.js" ... />
Upvotes: 1