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);
}
}
最近下载更多
筱洋1616 LV9
11月1日
Luck_ZDM LV12
10月24日
小丑八怪 LV2
10月21日
luhong LV5
9月20日
vincemokea LV9
9月14日
yangchengshuai LV16
9月3日
hulewang LV8
7月16日
大神程序员 LV23
7月2日
sgrfsgrts LV2
5月15日
微信网友_6631309708414976 LV5
4月26日

最近浏览
