package com.propertyManagement.business.support.config;

import com.propertyManagement.business.support.interceptor.WxUserLoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 用户登录拦截器
 *
 * @author liushuai
 * @date 2023/9/20
 */
@Configuration
public class PoniResourcesConfig implements WebMvcConfigurer
{
    @Autowired
    private WxUserLoginInterceptor userLoginInterceptor;


    /**
     * 自定义拦截规则
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry)
    {
        registry.addInterceptor(userLoginInterceptor).addPathPatterns("/api/**");
    }

}
