Commit fa55ea92 authored by 严俊's avatar 严俊

验证token调整

parent ed63f779
package com.afanticar.afantiopenapi.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
......@@ -14,12 +15,17 @@ import javax.annotation.Resource;
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {
@Resource
TokenInterceptor tokenInterceptor;
// @Resource
// TokenInterceptor tokenInterceptor;
@Bean
public TokenInterceptor getLoginInterceptor(){
return new TokenInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry register) {
register.addInterceptor(tokenInterceptor);
register.addInterceptor(getLoginInterceptor());
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment