@Bean public WebMvcConfigurationSupport initIndexConfig() { return new WebMvcConfigurationSupport() { @Override protected void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("login"); registry.addViewController("/index.html").setViewName("login"); } @Override protected void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**") .addResourceLocations("classpath:/resources") .addResourceLocations("classpath:/static") .addResourceLocations("classpath:/templates") .addResourceLocations("classpath:/public"); } @Override protected void addInterceptors(InterceptorRegistry registry) { super.addInterceptors(registry); } }; }
|