首页>代码>基于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);
    }
}
最近下载更多
GakkiMarryMe  LV9 12月13日
Osit888  LV12 10月24日
mritsy  LV2 10月10日
11999333  LV3 6月9日
newhaijun  LV16 6月7日
haitianjiaoyu0  LV8 5月27日
5418888  LV3 5月13日
陈小灏  LV18 2月21日
蓝羊羊  LV20 2月15日
最近浏览更多
GakkiMarryMe  LV9 12月13日
冰枫xjz8  LV31 12月4日
开开  LV4 11月26日
1271247100  LV9 11月21日
马儿爱吃兰  LV10 11月8日
Osit888  LV12 10月24日
mritsy  LV2 10月10日
atheking  LV18 9月4日
酷酷的轲  LV10 8月26日
38735466  LV11 8月18日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友