package com.cf.imes.module.system.framework.sms.config;

import com.cf.imes.module.system.framework.sms.core.client.SmsClientFactory;
import com.cf.imes.module.system.framework.sms.core.client.impl.SmsClientFactoryImpl;
import com.cf.imes.module.system.framework.sms.core.property.SmsProperties;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 短信配置类
 *
 * @author 晨丰科技
 */
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(SmsProperties.class)
public class ChenfengSmsAutoConfiguration {

    @Bean
    public SmsClientFactory smsClientFactory(SmsProperties smsProperties) {
        return new SmsClientFactoryImpl(smsProperties);
    }

}
