Java Code Examples for org.springframework.web.servlet.config.annotation.ViewControllerRegistry#addRedirectViewController()
The following examples show how to use
org.springframework.web.servlet.config.annotation.ViewControllerRegistry#addRedirectViewController() .
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: CamundaBpmWebappAutoConfiguration.java From camunda-bpm-platform with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { WebappProperty webapp = properties.getWebapp(); if (webapp.isIndexRedirectEnabled()) { String applicationPath = webapp.getApplicationPath(); registry.addRedirectViewController("/", applicationPath + "/app/"); } }
Example 3
Source File: WebMvcConfig.java From spring-boot-vue-admin with Apache License 2.0 | 5 votes |
/** 视图控制器 */ @Override public void addViewControllers(final ViewControllerRegistry registry) { // solved swagger2 registry.addRedirectViewController("/v2/api-docs", "/v2/api-docs?group=restful-api"); registry.addRedirectViewController( "/swagger-resources/configuration/ui", "/swagger-resources/configuration/ui"); registry.addRedirectViewController( "/swagger-resources/configuration/security", "/swagger-resources/configuration/security"); registry.addRedirectViewController("/swagger-resources", "/swagger-resources"); }
Example 4
Source File: WebConfig.java From spring4-sandbox with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/tasks"); // registry // .addViewController("/add") // .setViewName("add"); // registry // .addViewController("/edit") // .setViewName("edit"); }
Example 5
Source File: WebConfig.java From jcart with MIT License | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login").setViewName("public/login"); registry.addRedirectViewController("/", "/home"); }
Example 6
Source File: WebConfig.java From jcart with MIT License | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { super.addViewControllers(registry); registry.addViewController("/login").setViewName("login"); registry.addViewController("/register").setViewName("register"); registry.addRedirectViewController("/", "/home"); }
Example 7
Source File: MainApplication.java From camunda-bpm-swagger with Apache License 2.0 | 5 votes |
@Bean WebMvcConfigurerAdapter webMvcConfigurerAdapter() { return new WebMvcConfigurerAdapter() { @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/swagger", "/webjars/swagger-ui/3.1.4"); super.addViewControllers(registry); } }; }
Example 8
Source File: WebMvcConfig.java From littleca with Apache License 2.0 | 5 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { String index="login.html"; registry.addRedirectViewController("",index); registry.addRedirectViewController("index",index); registry.addRedirectViewController("/",index); }
Example 9
Source File: ZipkinServerConfiguration.java From pivotal-bank-demo with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/info", "/actuator/info"); }
Example 10
Source File: MetricsHealthController.java From pivotal-bank-demo with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/prometheus", "/actuator/prometheus"); }
Example 11
Source File: WebAppConfig.java From springsecuritystudy with MIT License | 4 votes |
/** * 设置欢迎页 * 相当于web.xml中的 welcome-file-list > welcome-file */ @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/index.html"); }
Example 12
Source File: WebConfig.java From spring-in-action-5-samples with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/orders/receive"); }
Example 13
Source File: CamundaBpmWebappAutoConfiguration.java From camunda-bpm-spring-boot-starter with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { if (properties.getWebapp().isIndexRedirectEnabled()) { registry.addRedirectViewController("/", "/app/"); } }
Example 14
Source File: WebConfig.java From spring-in-action-5-samples with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/orders/receive"); }
Example 15
Source File: WebConfig.java From spring-in-action-5-samples with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/orders/receive"); }
Example 16
Source File: InitializrWebConfig.java From initializr with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/info", "/actuator/info"); }
Example 17
Source File: WebConfig.java From spring4-sandbox with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/tasks"); }
Example 18
Source File: WebConfig.java From spring4-sandbox with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/tasks"); }
Example 19
Source File: WebConfig.java From spring-in-action-5-samples with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/orders/receive"); }
Example 20
Source File: WebConfig.java From spring4-sandbox with Apache License 2.0 | 4 votes |
@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addRedirectViewController("/", "/tasks.xhtml"); }