How to reference static resources from another web project with Spring MVC 4. We have 2 projects one with conext root /SampleWeb and other with /SampleStatic. Sample web project is a Spring MVC 4 application that needs to access the static HTML pages from /SampleStatic project.
We tried with the below configurations for MVC resource handler but it does not work. The code is in /SampleWeb AppConfig.java file
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/views/**").addResourceLocations(
"/SampleStatic/");
}
Aucun commentaire:
Enregistrer un commentaire