cn.lang.oss.configuration.OssUpyConfiguration Maven / Gradle / Ivy
package cn.lang.oss.configuration;
import cn.lang.oss.handler.OssUpyHandler;
import cn.lang.oss.properties.OssUpyProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 又拍云配置类
* @author Lang [email protected]
* date 2021-04-08 22:13
*/
@Configuration
@EnableConfigurationProperties({OssUpyProperties.class})
@ConditionalOnProperty(
prefix = "lang.oss.upy",
name = "enabled",
havingValue = "true"
)
public class OssUpyConfiguration {
@Autowired
private OssUpyProperties ossUpyProperties;
@Bean
public OssUpyHandler upyOss(){
return new OssUpyHandler(ossUpyProperties);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy