Package org.eweb4j.config.bean

Examples of org.eweb4j.config.bean.Prop


    this.ioc.setIocXmlFiles(iocXmlFiles);
  }
 
  public ConfigBeanCreator createProp(String id, String path){

    Prop prop = new Prop();
    prop.setId(id);
    prop.setPath(path);
    props.getFile().add(prop);
   
    return this;
  }
View Full Code Here


 
  public static ConfigBean getConfigBean() {
    ConfigBean configBean = new ConfigBean();
   
    Properties props = new Properties();
    Prop file = new Prop();
    props.getFile().add(file);
    configBean.setProperties(props);
   
    ConfigIOC ioc = new ConfigIOC();
    IOCXmlFiles iocXmlFiles = new IOCXmlFiles();
View Full Code Here

    // 设置是否每次启动框架都重新读取配置文件
    cb.setReload("false");

    // --------设置properties配置文件----------------------------
    Prop prop = new Prop();
    // 是否全局
    prop.setGlobal("false");
    // 文件ID
    prop.setId("DemoConstant");
    // 文件保存路径,相对路径,相对于${ConfigBasePath}
    prop.setPath("demo-constant.properties");
    cb.getProperties().getFile().add(prop);
    // -----------------------------------------------------------

    // --------IOC相关的配置---------------------------------------
    cb.getIoc().setOpen("true");
View Full Code Here

        String suffix1 = "_" + l.getLanguage() + "_" + l.getCountry();
        String tmpPath1 = path.replace(sufPro, suffix1 + sufPro);
        i18nIds.add(id);
        if (FileUtil.exists(ConfigConstant.CONFIG_BASE_PATH + tmpPath1)) {
          Prop p = new Prop();
          p.setGlobal("false");
          p.setId(id + suffix1);
          p.setPath(tmpPath1);
          readProperties(p, false);// 递归,把国际化文件内容加载仅缓存
          isCreate = false;// 如果存在国际化文件,那么默认的文件允许不存在
          continue;
        }

        String suffix2 = "_" + l.getLanguage();
        String tmpPath2 = path.replace(sufPro, suffix2 + sufPro);

        if (FileUtil.exists(ConfigConstant.CONFIG_BASE_PATH + tmpPath2)) {
          Prop p = new Prop();
          p.setGlobal("false");
          p.setId(id + suffix2);
          p.setPath(tmpPath2);
          readProperties(p, false);// 递归,把国际化文件内容加载仅缓存
          isCreate = false;// 如果存在国际化文件,那么默认的文件允许不存在
          continue;
        }
      }
View Full Code Here

    this.ioc.setIocXmlFiles(iocXmlFiles);
  }
 
  public ConfigBeanCreator createProp(String id, String path){

    Prop prop = new Prop();
    prop.setId(id);
    prop.setPath(path);
    props.getFile().add(prop);
   
    return this;
  }
View Full Code Here

    locale.setCountry(java.util.Locale.CHINA.getCountry());
    i18n.getLocale().add(locale);
    configBean.setLocales(i18n);
   
    Properties props = new Properties();
    Prop file = new Prop();
    props.getFile().add(file);
    configBean.setProperties(props);
   
    ConfigIOC ioc = new ConfigIOC();
    IOCXmlFiles iocXmlFiles = new IOCXmlFiles();
View Full Code Here

TOP

Related Classes of org.eweb4j.config.bean.Prop

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.