iterator = loader.iterator();
+ if (!iterator.hasNext()) {
+ return null;
+ }
+ return iterator.next();
+ } catch (Exception e) {
+ throw new IllegalArgumentException(configClazz.getName() + " spi file not found.", e);
}
}
}
diff --git a/sdk-infrastructure/src/main/java/group/rxcloud/capa/infrastructure/hook/MergedPropertiesConfig.java b/sdk-infrastructure/src/main/java/group/rxcloud/capa/infrastructure/hook/MergedPropertiesConfig.java
deleted file mode 100644
index fce050e..0000000
--- a/sdk-infrastructure/src/main/java/group/rxcloud/capa/infrastructure/hook/MergedPropertiesConfig.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package group.rxcloud.capa.infrastructure.hook;
-
-import group.rxcloud.cloudruntimes.domain.core.configuration.SubConfigurationResp;
-import group.rxcloud.cloudruntimes.utils.TypeRef;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import reactor.core.publisher.Flux;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReferenceArray;
-
-/**
- * Config provider to merge multiple properties file which takes the input order as their priority.
- *
- *
- * TODO: 2021/12/3 This should not in infrastructure layer.
- * TODO: 2021/12/3 Use Configuration extension api to get merged file.
- */
-@Deprecated
-public class MergedPropertiesConfig {
-
- private static final Logger log = LoggerFactory.getLogger(MergedPropertiesConfig.class);
-
- private final String fileName;
-
- private final AtomicReferenceArray