|
|
@ -7,9 +7,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
import org.springframework.http.converter.HttpMessageConverter;
|
|
|
|
import org.springframework.http.converter.HttpMessageConverter;
|
|
|
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
|
|
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
|
|
|
import org.springframework.util.AntPathMatcher;
|
|
|
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
|
|
|
|
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
|
|
|
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
|
|
|
|
import ${basePackage}.frame.utils.LogUtil;
|
|
|
|
import ${basePackage}.frame.utils.LogUtil;
|
|
|
@ -26,18 +24,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
|
@Value("${r'${spring.mvc.static-path-pattern}'}")
|
|
|
|
@Value("${r'${spring.mvc.static-path-pattern}'}")
|
|
|
|
private String[] staticPath;
|
|
|
|
private String[] staticPath;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 设置忽略路径大小写
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param configurer
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void configurePathMatch(PathMatchConfigurer configurer) {
|
|
|
|
|
|
|
|
AntPathMatcher matcher = new AntPathMatcher();
|
|
|
|
|
|
|
|
matcher.setCaseSensitive(false);
|
|
|
|
|
|
|
|
configurer.setPathMatcher(matcher);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 增加全局拦截器,可用于异常日志的收集
|
|
|
|
* 增加全局拦截器,可用于异常日志的收集
|
|
|
|
*
|
|
|
|
*
|
|
|
|