|
@@ -1,8 +1,10 @@
|
|
|
package cn.com.qmth.examcloud.service.examwork;
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.context.annotation.Profile;
|
|
|
+import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
@@ -17,9 +19,12 @@ import cn.com.qmth.examcloud.common.uac.AccessCtrlInterceptor;
|
|
|
//@Profile("prod")
|
|
|
public class AccessControlConfig extends WebMvcConfigurerAdapter {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ RedisTemplate redisTemplate;
|
|
|
+
|
|
|
@Bean
|
|
|
public AccessCtrlInterceptor getInterceptor() {
|
|
|
- return new AccessCtrlInterceptor();
|
|
|
+ return new AccessCtrlInterceptor(redisTemplate);
|
|
|
}
|
|
|
|
|
|
@Override
|