首页>代码>基于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);
    }
}
最近下载更多
可是不知道么  LV23 5月1日
周青松197  LV3 4月30日
DavidZeng1  LV4 4月29日
wanglinddad  LV55 4月29日
王愉悦  LV2 4月28日
tonghao  LV18 4月23日
xiaozhi丶  LV14 4月22日
jlmarket  LV22 4月22日
最代码官方  LV167 4月21日
最近浏览更多
小媛宝 1小时前
暂无贡献等级
shuangfu  LV25 前天
ZJY1122 前天
暂无贡献等级
vacalono  LV1 5月16日
wjh0420 5月16日
暂无贡献等级
sink122406  LV12 5月16日
逍遥2020  LV11 5月16日
xiao1111  LV2 5月15日
lh1234DGF  LV1 5月14日
来一杯西瓜冰咩  LV6 5月14日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友