package cn.axzo.msg.center.http;

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;

/**
 * @author yanglin
 */
@Configuration
@RequiredArgsConstructor
public class HttpConfigurer implements WebMvcConfigurer {

    private final PrivateHandlerInterceptor privateHandlerInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(privateHandlerInterceptor)
                .addPathPatterns("/private/message/**");
    }

}
