属性文件的加载读取

    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");
相关文章
相关标签/搜索