首页>代码>基于springboot的员工宿舍管理系统>/src/main/java/com/lian/demo/controller/MyMvcConfig.java
package com.lian.demo.controller;


import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("login");

    }
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**")
                .excludePathPatterns("/login.html","/css/**","/js/**","/charts/**","/datatable/**","/fonts/**","/images/**","/userLogin","/tozhuce","/sign","/userLogin");
    }
}
最近下载更多
15953970869  LV6 2024年11月10日
微信网友_6786215447367680  LV5 2024年10月11日
xinxin23383  LV7 2024年9月13日
微信网友_6767218254057472  LV3 2024年7月3日
计科一班  LV7 2024年6月18日
wanglinddad  LV55 2024年5月11日
Luck_ZDM  LV12 2024年4月12日
together love  LV2 2024年3月26日
wsl566666  LV2 2024年2月20日
3311545828  LV3 2024年1月19日
最近浏览更多
奋斗的小蚂蚁  LV16 11月7日
xiaotao555555  LV3 9月21日
dddding yang  LV6 9月15日
kele819  LV2 6月10日
lkke23047  LV1 5月26日
SX520886  LV6 4月24日
暂无贡献等级
jiaoyuhang  LV1 3月28日
xiaohuaidan455  LV2 2月23日
54ty1212 1月6日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友