本文整理匯總了Java中org.springframework.web.servlet.config.annotation.ViewControllerRegistry.addRedirectViewController方法的典型用法代碼示例。如果您正苦於以下問題:Java ViewControllerRegistry.addRedirectViewController方法的具體用法?Java ViewControllerRegistry.addRedirectViewController怎麽用?Java ViewControllerRegistry.addRedirectViewController使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.springframework.web.servlet.config.annotation.ViewControllerRegistry
的用法示例。
在下文中一共展示了ViewControllerRegistry.addRedirectViewController方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
LOGGER.info("Configure additional ViewControllers");
registry.addRedirectViewController("/", "/swagger-ui.html");
}
示例2: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
super.addViewControllers(registry);
registry.addRedirectViewController("/", "/ui");
registry.addViewController("/ui/**").setViewName("forward:/index.html");
}
示例3: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
String contextPath = zuulakoProperties.getContextPath();
if (StringUtils.hasText(contextPath)) {
registry.addRedirectViewController(contextPath, server.getPath(contextPath) + "/");
}
registry.addViewController(contextPath + "/").setViewName("forward:index.html");
}
示例4: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
/**
* 將無需後端處理的 url 重定向
*/
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/base-code/list");
}
示例5: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(final ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/send");
}
示例6: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "user");
}
示例7: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/swagger-ui.html");
}
示例8: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(final ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/swagger-ui.html");
super.addViewControllers(registry);
}
示例9: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(final ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/main.html");
}
示例10: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
/**
* 設置歡迎頁
* 相當於web.xml中的 welcome-file-list > welcome-file
*/
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/index.html");
}
示例11: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/login");
}
示例12: addViewControllers
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; //導入方法依賴的package包/類
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/home");
}