List of usage examples for org.springframework.web.servlet.config.annotation ViewControllerRegistry addViewController
public ViewControllerRegistration addViewController(String urlPath)
From source file:it.f2informatica.webapp.WebApplicationConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("redirect:/home"); registry.addViewController("/404").setViewName(Pages.PAGE_NOT_FOUND); registry.addViewController("/500").setViewName(Pages.SERVER_ERROR); }
From source file:org.meruvian.yama.webapi.config.WebConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { log.debug("Configure view controllers"); super.addViewControllers(registry); registry.addViewController("/login").setViewName("forward:/login.html"); registry.addViewController("/register").setViewName("forward:/register.html"); registry.addRedirectViewController("/oauth/approval", "/oauth_approval").setKeepQueryParams(true); registry.addViewController("/oauth_approval").setViewName("forward:/oauth_approval.html"); }
From source file:com.expedia.seiso.SeisoWebConfig.java
@Override protected void addViewControllers(ViewControllerRegistry registry) { // Lifted from org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration. [WLW] registry.addViewController("/").setViewName("forward:/index.html"); }
From source file:com.tcloud.bee.key.server.jetty.config.MvcConfiguration.java
@Override public void addViewControllers(ViewControllerRegistry registry) { /* Mapping to the login view. */ logger.trace("Add views..."); registry.addViewController("/login").setViewName("login"); registry.addViewController("/accessDenied").setViewName("accessDenied"); registry.addViewController("/test").setViewName("test"); registry.addViewController("/keymgmt").setViewName("keymgmt"); }
From source file:org.smigo.config.WebConfiguration.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/garden-planner-comparison").setViewName("garden-planner-comparison.jsp"); registry.addViewController("/").setViewName("home.jsp"); registry.addViewController("/help").setViewName("help.jsp"); registry.addViewController("/robots.txt").setViewName("robots-txt.jsp"); registry.addViewController("/sitemap.xml").setViewName("sitemap-xml.jsp"); registry.addRedirectViewController("/garden-planner.html", "/views/garden-planner.html") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/garden/**", "/garden-planner") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/hasta-luego/**", "/welcome-back") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/beta/**", "/").setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/accept-termsofservice/**", "/accept-terms-of-service") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/signup/**", "/register").setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/_=_", "/garden-planner").setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/wall/{username}/**", "/gardener/{username}") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addRedirectViewController("/tos.html", "/static/terms-of-service.html") .setStatusCode(HttpStatus.MOVED_PERMANENTLY); registry.addStatusController("/static/terms-of-service.html", HttpStatus.GONE); registry.addStatusController("/listspecies", HttpStatus.GONE); registry.addStatusController("/update-species", HttpStatus.GONE); registry.addStatusController("/rest/species/search", HttpStatus.GONE); registry.addStatusController("/addyear/**", HttpStatus.GONE); registry.addStatusController("/deletespecies/**", HttpStatus.GONE); registry.addStatusController("/species/**", HttpStatus.GONE); registry.addStatusController("/rule/**", HttpStatus.GONE); registry.addStatusController("**/*.php", HttpStatus.NOT_FOUND); registry.addStatusController("cgi-bin/**", HttpStatus.NOT_FOUND); registry.addStatusController("**/*.cgi", HttpStatus.NOT_FOUND); registry.addStatusController("/wp/", HttpStatus.NOT_FOUND); registry.addStatusController("/wordpress/", HttpStatus.NOT_FOUND); registry.addStatusController("/HNAP1/", HttpStatus.NOT_FOUND); registry.addStatusController("/blog/robots.txt", HttpStatus.NOT_FOUND); registry.addStatusController("/apple-touch-icon-precomposed.png", HttpStatus.NOT_FOUND); registry.addStatusController("/apple-touch-icon.png", HttpStatus.NOT_FOUND); }
From source file:com.epam.ta.reportportal.core.configs.MvcConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("forward:/index.htm"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
From source file:com.huffingtonpost.chronos.servlet.TestConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("/WEB-INF/site/index.html"); registry.addViewController("/jobs/**").setViewName("/WEB-INF/site/index.html"); registry.addViewController("/job/**").setViewName("/WEB-INF/site/index.html"); }
From source file:com.xiovr.unibot.config.MvcConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("index"); registry.addViewController("/login").setViewName("login"); }
From source file:aka.pirana.springsecurity.web.config.WebMvcConfig.java
@Override public void addViewControllers(ViewControllerRegistry registry) { System.out.println("aka.pirana.springsecurity.web.config.WebMvcConfig.addViewControllers()"); super.addViewControllers(registry); registry.addViewController("login/form").setViewName("login"); registry.addViewController("welcome").setViewName("welcome"); registry.addViewController("admin").setViewName("admin"); }
From source file:cn.newgxu.lab.core.config.SpringBeans.java
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("index"); registry.addViewController("/index").setViewName("index"); registry.addViewController("/home").setViewName("index"); }