forked from github/cool-admin-java
22 lines
663 B
Java
22 lines
663 B
Java
package com.cool.modules.user.token;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
/**
|
|
* 用户Web配置
|
|
*/
|
|
@RequiredArgsConstructor
|
|
@Configuration
|
|
public class UserWebConfig implements WebMvcConfigurer {
|
|
final private UserTokenInterceptor userTokenInterceptor;
|
|
|
|
@Override
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
registry.addInterceptor(userTokenInterceptor)
|
|
.addPathPatterns("/app/**");
|
|
}
|
|
}
|