org.springframework.web.servlet.config.annotation.ViewControllerRegistry Java Examples
The following examples show how to use
org.springframework.web.servlet.config.annotation.ViewControllerRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebMvcConfig.java From littleca with Apache License 2.0 | 7 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { String index="login.html"; registry.addRedirectViewController("",index); registry.addRedirectViewController("index",index); registry.addRedirectViewController("/",index); }
Example #2
Source File: Application.java From basic with MIT License | 6 votes |
@Bean public WebMvcConfigurer webMvcConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addViewControllers(ViewControllerRegistry viewControllerRegistry) { // 首页默认加载web端 viewControllerRegistry.addViewController("/").setViewName("/web/index.html"); viewControllerRegistry.addViewController("/index.html").setViewName("redirect:/"); // web首页 viewControllerRegistry.addViewController("/web").setViewName("/web/index.html"); // webapp首页 viewControllerRegistry.addViewController("/webapp").setViewName("/webapp/index.html"); viewControllerRegistry.setOrder(Ordered.HIGHEST_PRECEDENCE); super.addViewControllers(viewControllerRegistry); } }; }
Example #3
Source File: WebContext.java From spring-data-solr-showcase with Apache License 2.0 | 6 votes |
@Bean public WebMvcConfigurerAdapter mvcViewConfigurer() { return new WebMvcConfigurerAdapter() { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("search"); registry.addViewController("/monitor").setViewName("monitor"); } @Override public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { argumentResolvers.add(new PageableHandlerMethodArgumentResolver()); } }; }
Example #4
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #5
Source File: MvcConfigurationPublic.java From oncokb with GNU Affero General Public License v3.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/api").setViewName("redirect:/api/v1/swagger-ui.html"); registry.addViewController("/api/").setViewName("redirect:/api/v1/swagger-ui.html"); registry.addViewController("/api/v1/").setViewName("redirect:/api/v1/swagger-ui.html"); registry.addViewController("/api/v1").setViewName("redirect:/api/v1/swagger-ui.html"); }
Example #6
Source File: FrontendResourceHandler.java From openvidu with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/" + openviduConfig.getOpenViduFrontendDefaultPath()) .setViewName("redirect:/" + openviduConfig.getOpenViduFrontendDefaultPath() + "/"); registry.addViewController("/" + openviduConfig.getOpenViduFrontendDefaultPath() + "/") .setViewName("forward:/" + openviduConfig.getOpenViduFrontendDefaultPath() + "/index.html"); super.addViewControllers(registry); }
Example #7
Source File: WebConfig.java From tutorials with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/").setViewName("forward:/index"); registry.addViewController("/index"); registry.addViewController("/login"); }
Example #8
Source File: TomcatConfiguration.java From flowing-retail with Apache License 2.0 | 5 votes |
@Bean public WebMvcConfigurerAdapter forwardToIndex() { return new WebMvcConfigurerAdapter() { @Override public void addViewControllers(ViewControllerRegistry registry) { // forward requests index.htm (as we might have two spring boot tomcats // running in the same JVM they can see each others resources // so we use different index files to avoid confusion registry.addViewController("/").setViewName("forward:/shop.html"); } }; }
Example #9
Source File: MvcConfig.java From training with MIT License | 5 votes |
public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/home").setViewName("home"); registry.addViewController("/").setViewName("home"); registry.addViewController("/hello").setViewName("hello"); registry.addViewController("/csrf").setViewName("csrf"); registry.addViewController("/login").setViewName("login"); }
Example #10
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #11
Source File: MyAdapter.java From JavaQuarkBBS with Apache License 2.0 | 5 votes |
/** * 配置默认路径为文档 * @param registry */ @Override public void addViewControllers( ViewControllerRegistry registry ) { registry.addViewController( "" ).setViewName( "redirect:/swagger-ui.html" ); registry.setOrder( Ordered.HIGHEST_PRECEDENCE ); super.addViewControllers( registry ); }
Example #12
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #13
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #14
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #15
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #16
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #17
Source File: WebMvcConfig.java From Spring-Boot-Book with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { //设置登录处理操作 registry.addViewController("/home/login").setViewName("user/login"); registry.addViewController("/admin/login").setViewName("admin/login"); registry.addViewController("/admin/rbac").setViewName("admin/test"); }
Example #18
Source File: LoginController.java From taskana with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { LOGGER.debug("Entry to addViewControllers()"); registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); LOGGER.debug("Exit from addViewControllers()"); }
Example #19
Source File: WebConfiguration.java From Spring-Boot-2-Fundamentals with MIT License | 5 votes |
@Bean public WebMvcConfigurer initializrWebMvcConfigurer() { return new WebMvcConfigurer() { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("home"); registry.addViewController("/index").setViewName("home"); registry.addViewController("/home").setViewName("home"); registry.addViewController("/start").setViewName("home"); registry.addViewController("/index.html").setViewName("home"); } }; }
Example #20
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #21
Source File: MvcConfig.java From tutorials with MIT License | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/home").setViewName("home"); registry.addViewController("/").setViewName("home"); registry.addViewController("/hello").setViewName("hello"); registry.addViewController("/login").setViewName("login"); }
Example #22
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #23
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #24
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #25
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #26
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #27
Source File: MvcConfig.java From tutorials with MIT License | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login") .setViewName("login"); registry.addViewController("/homepage") .setViewName("homepage"); }
Example #28
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #29
Source File: WebMvcConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Override public void addViewControllers(final ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login/form") .setViewName("login"); registry.addViewController("/errors/403") .setViewName("/errors/403"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example #30
Source File: StaticResourceConfiguration.java From ambari-logsearch with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName( "forward:/index.html"); registry.addViewController("/docs").setViewName( "forward:/swagger.html"); }