java.util.Properties props = new java.util.Properties();
in = getClass().getResourceAsStream("/HotelBeContextDAO.properties");
try {
props.load(in);
props.getProperty("officeCode")
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}JAVA获取配置信秘
原文:http://www.blogjava.net/fiele/archive/2015/05/20/425186.html