package com.ytpm.oss;

import cn.hutool.core.util.ReflectUtil;

/**
 * 存储工厂
 */
public class StorageFactory {
    public static StorageTemplate createStorageTemplate(OssProperties ossProperties) {
        StorageTemplate storageTemplate = ReflectUtil.newInstance(ossProperties.getName());
        storageTemplate.init(ossProperties);
        return storageTemplate;
    }
}
