Beispiel #1
0
 /** static block to load configuration. */
 static {
   jdbcUrl = PropertiesUtil.getValue("jdbcUrl");
   checkParameter("jdbcUrl", jdbcUrl);
   user = PropertiesUtil.getValue("user");
   checkParameter("user", user);
   password = PropertiesUtil.getValue("password");
   checkParameter("password", password);
   String size = PropertiesUtil.getValue("initialPoolSize");
   if (StringUtil.isNotEmpty(size)) {
     initialPoolSize = Integer.valueOf(size);
   }
   String bean = PropertiesUtil.getValue("beanPackage");
   if (StringUtil.isNotEmpty(bean)) {
     beanPackage = bean;
   }
 }
  @Test
  public void getValueTest() {

    System.out.println(PropertiesUtil.getValue("test"));
  }