首页>代码>基于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);
    }
}
最近下载更多
sgrfsgrts  LV2 5月15日
SX520886  LV6 4月24日
lipiao161  LV16 3月16日
dane168  LV8 2月17日
BlackList  LV6 1月2日
ma406805131  LV19 2024年12月26日
最近浏览更多
浙江螃蟹  LV7 25分钟前
3334004690  LV11 6月28日
helloworldsbsb  LV8 6月25日
yifeng868  LV9 6月23日
xiaotao555555  LV3 6月20日
暂无贡献等级
liqingzhao6  LV12 6月15日
Maomaoyun 6月12日
暂无贡献等级
小小可爱 6月11日
暂无贡献等级
潜心小白来到  LV3 6月10日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友