package com.sdut.labex.config;

import com.sdut.labex.interceptor.TokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * File: MVBConfig
 * Created: 2023/6/11
 * Author: springforest
 * Description:
 */
@Configuration
public class MVBConfig implements WebMvcConfigurer {
    @Resource
    private TokenInterceptor tokenInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenInterceptor)
                .excludePathPatterns("/login/**")
                .excludePathPatterns("/register/**");
    }
}
