List of usage examples for org.springframework.web.servlet.config.annotation ViewControllerRegistry addViewController
public ViewControllerRegistration addViewController(String urlPath)
From source file:alfio.config.MvcConfiguration.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/admin/partials/index.html").setViewName("/admin/partials/main"); }
From source file:org.bonitasoft.web.designer.config.WebMvcConfiguration.java
@Override public void addViewControllers(ViewControllerRegistry registry) { if (this.resourceLoader.getResource("classpath:/static/index.html").exists()) { // Use forward: prefix so that no view resolution is done try {/* w ww. j ava2 s .c o m*/ logger.info("Adding welcome page: " + this.resourceLoader.getResource(FRONTEND_RESOURCES + "index.html").getURL()); registry.addViewController("/").setViewName("forward:/index.html"); } catch (IOException e) { logger.error("The home page index.html was not found", e); } } }
From source file:de.codecentric.boot.admin.config.AdminServerWebConfiguration.java
@Override public void addViewControllers(ViewControllerRegistry registry) { if (StringUtils.hasText(adminServerProperties().getContextPath())) { registry.addRedirectViewController(adminServerProperties().getContextPath(), server.getPath(adminServerProperties().getContextPath()) + "/"); }//w ww. j a va2s .c om registry.addViewController(adminServerProperties().getContextPath() + "/") .setViewName("forward:index.html"); }