屬性文件的加載讀取

    private static Properties properties = null;//圖片屬性文件
    static{
        String filepath = "/properties/imgPath-cfg.properties";
        InputStream isInputStream = MatchAdviseController.class.getResourceAsStream(filepath);
        properties = new Properties();
        try {
            properties.load(isInputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private static String goodsImg = properties.getProperty("httpAddr.Resources");
    private static String wardRobeImg = properties.getProperty("imgNetPath");
相關文章
相關標籤/搜索