package com.persagy.adm.diagram.config;


import com.persagy.adm.diagram.frame.BdtpInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 拦截器配置
 */
@Configuration
public class InterceptorAdapterConfig implements WebMvcConfigurer {

	@Bean
	public BdtpInterceptor bdtpInterceptor() {
		return new BdtpInterceptor();
	}

	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		//TODO 设置优先级
		registry.addInterceptor(bdtpInterceptor());
	}

}