package com.hotent.base.conf;

import com.hotent.base.request.CleanResourcesInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * mvc 配置扩展
 * @author jason
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Resource
    CleanResourcesInterceptor cleanResourcesInterceptor;

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