The placement of static resources

"classpath:/META-INF/resources/", 
"classpath:/resources/",
"classpath:/static/", 
"classpath:/public/"
Copy the code

Static resources, such as images, can be accessed by browsers through host:port/path-to-resource paths. Priorities decrease from top to bottom.

The project cannot be accessed after the static resource is added and restarted

After adding static resources to the project, the browser cannot access them. In this case, run the MVN clean command to clear the cache and access the static resources again.