I am using Java8 with Spring 4.3.1.RELEASE.
I have the following folder structure.
@Configuration
@EnableWebMvc
public class MvcConfig extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//registry.addResourceHandler("*.html").addResourceLocations("/", "/www/");
//registry.addResourceHandler("/html/**").addResourceLocations("/www/");
registry.addResourceHandler("*.html").addResourceLocations("/");
}
}
This allows me to access html
files in the webapp
folder.
e.g. http://localhost:8080/jbosswildfly-1.0/home.html
Question
How do I configure it, so that I can also access html files in the webapp/www
folder?
e.g. http://localhost:8080/jbosswildfly-1.0/www/index.html
returns:
No mapping found for HTTP request with URI [/jbosswildfly-1.0/www/index.html] in DispatcherServlet with name 'rest'