tech.hdis.framework.security.config.InterceptorConfig Maven / Gradle / Ivy
package tech.hdis.framework.security.config;
import tech.hdis.framework.security.interceptor.SessionInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import javax.annotation.Resource;
/**
* 权限拦截器配置
*
* @author 黄志文
*/
@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {
@Resource
private SessionInterceptor sessionInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
super.addInterceptors(registry);
registry.addInterceptor(sessionInterceptor).addPathPatterns("/**");
}
}