Java Code Examples for org.springframework.web.servlet.config.annotation.ViewControllerRegistry#setOrder()
The following examples show how to use
org.springframework.web.servlet.config.annotation.ViewControllerRegistry#setOrder() .
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: 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 2
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 3
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 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: 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 6
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 7
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 8
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 9
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 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: 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 12
Source File: BaseApplicationConfig.java From spring-boot-doma2-sample with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { // コントローラーを追加する registry.addViewController(FORBIDDEN_URL).setViewName(FORBIDDEN_VIEW); registry.addViewController(ERROR_URL).setViewName(ERROR_VIEW); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 13
Source File: WebMvcConfig.java From SpringBoot-Base-System with GNU Lesser General Public License v3.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("forward:/admin/login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); super.addViewControllers(registry); }
Example 14
Source File: WebConfig.java From pizzeria with MIT License | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 15
Source File: SystemConfigurer.java From jeewx-boot with Apache License 2.0 | 4 votes |
/** * 默认跳转登录页面 */ @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("redirect:/system/login.do"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 16
Source File: WelcomePageRedirect.java From jsf-primefaces with MIT License | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/") .setViewName("forward:/helloworld.xhtml"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 17
Source File: WebConfig.java From Spring with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 18
Source File: WebConfig.java From Spring with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 19
Source File: WebConfig.java From Spring with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }
Example 20
Source File: WebConfig.java From Spring with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/login").setViewName("login"); registry.setOrder(Ordered.HIGHEST_PRECEDENCE); }