Issue
I am working on a spring mvc maven project, and here is my file structure : [1]: https://i.stack.imgur.com/hSW66.png
body {
background: url("/WEB-INF/Images/Image/tests.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
This is my css to display the background image. But for some reason, the image is not getting displayed. Please help.
Solution
you must tell spring what path to access static resources in the xml config
<mvc:resources location="/resources/" mapping="/res/**"></mvc:resources> "resources" is the folder in the project, "res" is the request mapping
Answered By - Fajar AM