dimanche 12 avril 2015

Spring serving static files

I'm developing a web application on Spring (Java Config) and I'm trying to serve some static files using this:



public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/");
}


In resources i have resources/css, resources/img, resources/plugins,etc. but Spring only serve some files. i.e. i'm trying to load http://localhost:8084/sicogep/resources/plugins/bootstrap/js/bootstrap.min.js and Tomcat says that is not available (HTTP 404).


I hope you can help me.


Aucun commentaire:

Enregistrer un commentaire