|
@@ -0,0 +1,26 @@
|
|
|
|
+package cn.com.qmth.examcloud.core.basic.starter.config;
|
|
|
|
+
|
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
|
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
+
|
|
|
|
+import cn.com.qmth.examcloud.commons.web.security.FirstInterceptor;
|
|
|
|
+import cn.com.qmth.examcloud.commons.web.security.RequestPermissionInterceptor;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * 默认WebMvcConfigurer
|
|
|
|
+ *
|
|
|
|
+ * @author WANGWEI
|
|
|
|
+ * @date 2018年5月22日
|
|
|
|
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
|
|
+ */
|
|
|
|
+@Configuration
|
|
|
|
+public class DefaultWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
+ registry.addInterceptor(new FirstInterceptor()).addPathPatterns("/**");
|
|
|
|
+ registry.addInterceptor(new RequestPermissionInterceptor()).addPathPatterns("/**");
|
|
|
|
+ super.addInterceptors(registry);
|
|
|
|
+ }
|
|
|
|
+}
|