java知识点——从目录下读取properties

try{

Properties properties = new Properties();
InputStream fis = RecSysFilter.class.getResourceAsStream("mongo.properties");
properties.load(fis);
String host = properties.getProperty("host") }

 

猜你喜欢

转载自www.cnblogs.com/pocahontas/p/11447778.html