首页>代码>基于SpringBoot实现的学生就业管理系统>/源代码/employment/src/main/java/com/project/config/LoginConfig.java
package com.project.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;

/**
 * @author: liangrenren
 * @date: 2021-03-04 11:30
 **/
@Configuration
public class LoginConfig extends WebMvcConfigurationSupport {

    @Value("${upload}")
    private String upload;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration registration = registry.addInterceptor(new AdminInterceptor());
        registration.addPathPatterns("/**");
        registration.excludePathPatterns(
                "/user/login",
                "/user/getVerificationCode",
                "/upload/**",
                "/user/addCompany",
                "/image/**",
                "/js/**",
                "/lib/**",
                "/index.html");
    }

    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        super.addResourceHandlers(registry);
        registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/")
                .addResourceLocations("classpath:/static/");
        registry.addResourceHandler("/upload/**").addResourceLocations("file:" + upload);
    }
}
最近下载更多
1271247100  LV9 2025年11月21日
筱洋1616  LV9 2025年11月1日
Luck_ZDM  LV12 2025年10月24日
小丑八怪  LV2 2025年10月21日
luhong  LV5 2025年9月20日
vincemokea  LV9 2025年9月14日
yangchengshuai  LV16 2025年9月3日
hulewang  LV8 2025年7月16日
大神程序员  LV23 2025年7月2日
sgrfsgrts  LV2 2025年5月15日
最近浏览更多
14716825  LV1 1月2日
1383838438  LV2 2025年12月22日
微信网友_7824017348743168 2025年12月22日
暂无贡献等级
微信网友_7823843693924352  LV1 2025年12月22日
hpr1234511  LV3 2025年12月5日
1271247100  LV9 2025年11月21日
yigu123  LV6 2025年11月8日
rao11011  LV1 2025年11月5日
筱洋1616  LV9 2025年11月1日
khmumuno 2025年10月24日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友