0
点赞
收藏
分享

微信扫一扫

【Spring高级】Spring Boot启动过程

搬砖的小木匠 4小时前 阅读 0
java

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

package com.gather.map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapTest03 {
    public static void main(String[] args) {
        Map<String,String > m = new HashMap();
        m.put("name1","yanyu1");
        m.put("name2","yanyu2");
        m.put("name3","yanyu3");
//        直接 拿到整个    key  -   value  键值对
        Set<Map.Entry<String, String>> map = m.entrySet();//ctrl   alt   v
//        拿到了  key  value  组成的 node  节点  对象(  含  key   value)
        for (Map.Entry<String, String>   node : map
             ) {
//            String key = node.getKey();
//            String value = node.getValue();
            System.out.println(node.getKey() + "---->" + node.getValue());
        }


    }


}

在这里插入图片描述

package com.gather.map;

import java.util.ResourceBundle;

public class Test {
    public static void main(String[] args) {
//        RB
        ResourceBundle bundle = ResourceBundle.getBundle("com\\gather\\map\\db");
//        System.out.println(bundle);
//
        System.out.println(bundle.getString("name"));//yanyu


    }
}

举报

相关推荐

0 条评论