package com.liquidnet.service.candy.config;

import com.liquidnet.common.web.config.WebMvcConfig;
import com.liquidnet.common.web.filter.GlobalAuthorityInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

@Configuration
public class CandyWebMvcConfig extends WebMvcConfig {
    @Autowired
    public GlobalAuthorityInterceptor globalAuthorityInterceptor;

    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(this.globalAuthorityInterceptor).addPathPatterns("/**");
        super.addInterceptors(registry);
    }
}
