load Properties

/*     */   public static final Properties loadProperties(String propertyFileRelativePath)
/*     */   {
/*  67 */     Properties properties = null;
/*     */     try {
/*  69 */       InputStream inputStream = getResourceAsStream(propertyFileRelativePath);
/*  70 */       if (inputStream != null) {
/*  71 */         properties = new Properties();
/*  72 */         properties.load(inputStream);
/*  73 */         inputStream.close();
/*     */       }
/*     */     }
/*     */     catch (IOException e) {}
/*     */     
/*     */ 
/*  79 */     return properties;
/*     */   }
            Properties property = FileUtility.loadProperties("xx.properties");
            String casFlag = property.getProperty("xx");

 

posted @ 2017-09-06 12:03  kakaisgood  阅读(390)  评论(0编辑  收藏  举报