本文整理汇总了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");
}