在开发中经常用到.properties配置文件的使用,以下是一简单应用实例
public static void main(String[] args) throws IOException {
Properties properties=new Properties();
InputStream inStr=Object.class.getResourceAsStream("/test.properties");
properties.load(inStr);
System.out.println(properties.getProperty("name"));
}