java怎么写配置文件( 三 )


weather.xml
用下面的方法就可以找到weather.xml
private static String getXmlContent()throws IOException {
Reader f = new InputStreamReader(QueryWeather.class.getClass().getResourceAsStream("/weather/weather.xml"));
BufferedReader fb = new BufferedReader(f);
StringBuffer sb = new StringBuffer("");
String s = "";
【java怎么写配置文件】

java怎么写配置文件

文章插图