This commit is contained in:
xiangwb
2017-11-21 16:41:59 +08:00
parent ee30db5e5c
commit 3b3e078cbe
2 changed files with 3 additions and 0 deletions
@@ -66,6 +66,7 @@ public class DispatcherServletConfig extends WebMvcConfigurerAdapter {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("login.html");
registry.addRedirectViewController("doc","swagger-ui.html");
//添加更多
registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
super.addViewControllers(registry);
@@ -28,6 +28,8 @@ public class LoginInterceptor extends HandlerInterceptorAdapter {
static {
//映射到登录页面,不拦截
set.add("/");
//映射swagger文档
set.add("/doc");
//验证码
set.add("/servlet/captcha");
//swagger