清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class readproperties {
public static void main(String[] args) {
//配置文件放在src下
InputStream inStream= (InputStream) readproperties.class.getClassLoader().
getResourceAsStream("ApplicationResources.properties");//.ApplicationResources.properties
Properties properties=new Properties();
try {
properties.load(inStream);
} catch (IOException e) {
e.printStackTrace();
}
String value=properties.getProperty("key");
System.out.println("getProperty...................."+value);
}
}