package com.njzscloud.common.wechat.config;

import com.njzscloud.common.http.HttpClientDecorator;
import com.njzscloud.common.wechat.WechatApi;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(WechatProperties.class)
public class WechatAutoConfiguration {
    @Bean
    public WechatApi wechatApi(HttpClientDecorator decorator) {
        return decorator.decorate(WechatApi.class);
    }
}
