@Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { /* * Ensures that dispatcher servlet can be mapped to '/' and that static resources * are still served by the containers default servlet. */ configurer.enable(); }
@Override public void configureDefaultServletHandling( DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
/** * 将对于静态资源的请求转发到 Servlet 容器的默认处理静态资源的 Servlet * 因为将 Spring 的拦截模式设置为 "/" 时会对静态资源进行拦截 */ @Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
@Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
@Override protected void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
@Override public void configureDefaultServletHandling(final DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
@Override // caso o spring não consiga resolver a requisição para um controler, ele deixa a cargo do conteiner java web public void configureDefaultServletHandling( DefaultServletHandlerConfigurer configurer) { configurer.enable(); }
@Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { // TODO Auto-generated method stub super.configureDefaultServletHandling(configurer); configurer.enable("staticServlet"); }
@Override public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { super.configureDefaultServletHandling(configurer); }