All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.crazywalker.fsf.oss.configuration.OSSConfiguration Maven / Gradle / Ivy

The newest version!
package cn.crazywalker.fsf.oss.configuration;

import cn.crazywalker.fsf.oss.OSSClient;
import cn.crazywalker.fsf.oss.OSSFileHandler;
import cn.crazywalker.fsf.oss.OSSService;
import cn.crazywalker.fsf.oss.OSSServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * @author CrazyWalker
 * @since 周六, 04/22 2023 17:46 GMT+8
 */
@Configuration
@ComponentScan("cn.crazywalker.fsf.oss.configuration")
public class OSSConfiguration {

    @Bean
    @ConditionalOnBean(OSSClient.class)
    public OSSService ossService(OSSClient ossClient, List ossFileHandlerList) {
        return new OSSServiceImpl(ossClient, ossFileHandlerList);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy