com.github.xiaoyuge5201.config.CloopenSMSAutoConfiguration Maven / Gradle / Ivy
The newest version!
package com.github.xiaoyuge5201.config;
import com.github.xiaoyuge5201.component.CloopenSmsClient;
import com.github.xiaoyuge5201.props.CloopenSMSProperties;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author yugb
*/
@Configuration
@ConditionalOnWebApplication
@ConditionalOnProperty(name = "sms.cloopen.enable")
@EnableConfigurationProperties(CloopenSMSProperties.class)
public class CloopenSMSAutoConfiguration {
/**
* 依赖注入属性
*
* @param properties
* @return
*/
@Bean
public CloopenSmsClient cloopenSmsClient(CloopenSMSProperties properties) {
CloopenSmsClient cloopenSmsClient = new CloopenSmsClient(properties);
return cloopenSmsClient;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy