Reputation: 2536
I have uploaded my project on the project to git https://github.com/gitekiras/spring-boot-gradle-mvc
What i am not able to get right is that i am not able to load the css and js from the resources folder.
When i put it in webapp folder, i am able to get every thing working but according to the tutorials, i should put them in the static folder in resources.
but when i do so i am not able to load the css and js on page.
Can any one say what i am missing ?
Also: when i see in browser logs - it shows that it is trying to find the js and css files as application/json
. I am not sure what i have done wrong here.
Upvotes: 3
Views: 4688
Reputation: 6657
You explicitly overrode the default behavior by adding your own @EnableWebMvc
- see Spring MVC auto-configuration. Remove the @EnableWebMvc
(and also unneeded resource handler for /resources/**
) and it will work.
Upvotes: 1