InputStream in=this.getClass().getResourceAsStream("/config.properties");
Properties p=new Properties();
p.load(in);
String url=p.getProperty("urltoken");
//输入
/*String profilepath = BaseController.class.getResource("/").getPath()+"face.properties";//我的配置文件在src根目录下
PropertiesConfiguration config = new PropertiesConfiguration(profilepath);
config.setAutoSave(true);
config.setProperty("tokenday",sdf.format(lDate));
// 以适合使用 load 方法加载到 Properties 表中的格式,
config.setProperty("access_token",token);*/
输出方法暂未考据
Properties传参无法读取到配置文件问题
最新推荐文章于 2024-07-30 18:36:42 发布