1、img_url.properties
imgurl=http://10.1.19.65:8090
2、Test.java
InputStream inputStream = this.getClass().getResourceAsStream("/img_url.properties"); Properties p = new Properties(); try { p.load(inputStream); } catch (IOException e1) { e1.printStackTrace(); }
System.out.println("imgurl="+p.getProperty("imgurl"));