package org.springblade.thirdparty.oa.config;

import feign.RequestInterceptor;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;

/**
 * @author bfhuange
 * @since 2024/12/18
 */
public class OAFeignClientConfig {
	@Resource
	OAProperties oaProperties;

    @Bean
    public RequestInterceptor requestInterceptor() {
        return template -> {
            // 空实现屏蔽 全局拦截器 BladeFeignRequestInterceptor
			String authorization=oaProperties.getAuthorization();
			template.header("Authorization",authorization);
        };
    }
}
