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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With