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");