diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/plugins/oss/OssStorageFactory.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/plugins/oss/OssStorageFactory.java index a5c49f4..a051604 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/plugins/oss/OssStorageFactory.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/plugins/oss/OssStorageFactory.java @@ -42,7 +42,7 @@ public enum OssStorageFactory { INSTANCE; /** OSS 服务容器 */ - private final Map ossStorageServiceMap = Maps.newHashMap(); + private final Map ossStorageServiceMap; /** * 获得OSS 执行类 @@ -79,8 +79,8 @@ public enum OssStorageFactory { * 初始化 */ OssStorageFactory(){ - // 清空执行器集合 - ossStorageServiceMap.clear(); + // 初始化容器 + ossStorageServiceMap = Maps.newHashMap(); // 拿到实现了 OssStorageService 接口的,所有子类 Set> clazzSet = ClassUtil.scanPackageBySuper(