package xtools.boot.storage.file.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xtools.boot.storage.base.service.StorageService;
import xtools.boot.storage.file.service.impl.StorageServiceFileImpl;

/**
 * <p>Title : FileStorageConfig</p>
 * <p>Description : FileStorageConfig</p>
 * <p>DevelopTools : Idea_x64_v2026.1</p>
 * <p>DevelopSystem : macOS Sequoia 15.7.5</p>
 * <p>Company : org.xujun</p>
 *
 * @author : XuJun
 * @version : 5.0.0
 * @date : 2026/3/14 07:53
 */
@Configuration
public class FileStorageConfig {

    /**
     * 创建文件存储服务
     *
     * @return StorageService
     */
    @Bean
    @ConditionalOnProperty(prefix = "storage", name = "type", havingValue = "file")
    public StorageService fileStorage() {
        return new StorageServiceFileImpl();
    }
}
