|
@@ -1,3 +1,19 @@
|
|
|
+
|
|
|
+ * 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:
|
|
|
+ *
|
|
|
+ * 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 org.apache.dolphinscheduler.dao.config;
|
|
|
|
|
|
|
|
@@ -10,12 +26,9 @@ import java.util.Iterator;
|
|
|
import java.util.LinkedHashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
-
|
|
|
- * Created by qiaozhanwei on 2019/9/17.
|
|
|
- */
|
|
|
public class YmlConfig {
|
|
|
|
|
|
- private static Map<String,String> allMap=new HashMap<String,String>();
|
|
|
+ public static Map<String,String> allMap=new HashMap<String,String>();
|
|
|
static {
|
|
|
Yaml yaml = new Yaml();
|
|
|
InputStream inputStream = YmlConfig.class.getResourceAsStream("/application.yml");
|
|
@@ -26,11 +39,6 @@ public class YmlConfig {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- String ss = allMap.get("spring.datasource.url");
|
|
|
- System.out.println(ss);
|
|
|
- }
|
|
|
-
|
|
|
public static void iteratorYml(Map map,String key){
|
|
|
Iterator iterator = map.entrySet().iterator();
|
|
|
while(iterator.hasNext()){
|