package com.training;
import java.io.InputStream;
import java.util.Properties;
public class Proper{
private static Properties pro = null;
static{
try {
pro = new Properties();
InputStream in = BeanFactory.class.getClassLoader().getResourceAsStream("BeanProperties");
pro.load(in);
}
catch(Exception e) {
throw new ExceptionInInitializerError("初始化properties失败!");
}
}
}
Eclipse—JAVA:加载资源文件
最新推荐文章于 2021-08-10 11:27:39 发布