SpringMVC: The precedence of @RequestMapping and Static Resource serving
问题 I have the following mapping for a controller handler method: @RequestMapping(value = "login.html") public String doLogin(Model model) { return "login"; } And I have the following configuration for static *.html resource: public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("*.html").addResourceLocations(("/static/")); } So suppose I am visiting login.html , which one will take the precedence? Any official document about the by-design behavior? ADD 1