package cn.axzo.workflow.server.common.config;

import cn.axzo.workflow.server.common.interceptor.RequestHeaderContextInterceptor;
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;

/**
 * Web Mvc Interceptor Config
 *
 * @author wangli
 * @since 2024/2/6 11:35
 */
@Configuration(proxyBeanMethods = false)
public class WebMvcConfiguration implements WebMvcConfigurer {
    @Autowired
    private RequestHeaderContextInterceptor requestHeaderContextInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(requestHeaderContextInterceptor);
    }
}
