Package org.eweb4j.util.xml

Examples of org.eweb4j.util.xml.XMLWriter


          + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      LogFactory.getORMLogger("INFO").write(
          "backup file->" + tf.getAbsolutePath());

      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          DAOConfigBeanCreator.getDAOBean());
      writer.setBeanName("dataSource");
      writer.setClass("dataSource", DBInfoConfigBean.class);
      writer.write();

      StringBuilder tsb = new StringBuilder(
          ConfigInfoCons.REPAIR_CONFIG_FILE);
      tsb.append(err);
      error = tsb.toString();
View Full Code Here


      File tf = new File(configFile.getAbsolutePath() + ".back"
          + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      LogFactory.getORMLogger("INFO").write(
          "backup file ->" + tf.getAbsolutePath());
      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          ORMConfigBeanCreator.getORMBean());
      writer.setBeanName("orm");
      writer.setClass("orm", ORMConfigBean.class);
      writer.write();
      StringBuilder sb = new StringBuilder(ConfigInfoCons.REPAIR_INFO);
      sb.append(err);
      error = sb.toString();

      LogFactory.getORMLogger("ERROR").write(error);
View Full Code Here

      // 保存为备份文件
      File tf = new File(configFile.getAbsolutePath() + ".back"
          + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      LogFactory.getIOCLogger("INFO").write("backup file ->"+tf.getAbsolutePath());
      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          IOCConfigBeanCreator.getIOCBean());
      writer.setBeanName("ioc");
      writer.setClass("ioc", IOCConfigBean.class);
      writer.write();
     
      StringBuilder sb = new StringBuilder(
          ConfigInfoCons.REPAIR_FILE);
     
      sb.append(error);
View Full Code Here

          Class<?> _cls = ClassUtil.getPojoClass(this.method);
          if (_cls != null)
            cls = _cls;
        }

        XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(retn);
        writer.setCheckStatck(true);
        writer.setSubNameAuto(true);
        writer.setClass(cls);
        writer.setRootElementName(null);
        this.context.getResponse().setContentType(MIMEType.XML);
        this.context.getWriter().print(writer.toXml());
      } else {
        this.context.getWriter().print("@Produces 注解暂时不支持JSON 、XML以外的渲染技术");
      }
     
      this.context.getWriter().flush();
View Full Code Here

          + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      LogFactory.getMVCLogger("INFO").write(
          "backup file->" + tf.getAbsolutePath());

      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          MVCConfigBeanCreator.getActionBean());
      writer.setBeanName("action");
      writer.setClass("action", ActionConfigBean.class);
      writer.write();

      StringBuilder tsb = new StringBuilder(
          ConfigErrCons.CONFIG_INFO_READ_ERROR);
      tsb.append(err);
      error = tsb.toString();
View Full Code Here

      // 保存为备份文件
      File tf = new File(configFile.getAbsolutePath() + ".back" + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      log.debug("backup file->" + tf.getAbsolutePath());

      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          MVCConfigBeanCreator.getInterBean());
      writer.setBeanName("interceptor");
      writer.setClass("interceptor", InterConfigBean.class);
      writer.write();

      StringBuilder tsb = new StringBuilder(ConfigErrCons.CONFIG_INFO_READ_ERROR);
      tsb.append(sb.toString());
      log.error(tsb.toString());
      error = tsb.toString();
View Full Code Here

      // 保存为备份文件
      File tf = new File(configFile.getAbsolutePath() + ".back" + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      log.debug("backup file->" + tf.getAbsolutePath());

      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile, MVCConfigBeanCreator.getActionBean());
      writer.setBeanName("action");
      writer.setClass("action", ActionConfigBean.class);
      writer.write();

      StringBuilder tsb = new StringBuilder(ConfigErrCons.CONFIG_INFO_READ_ERROR);
      tsb.append(err);
      error = tsb.toString();
      // log-----
View Full Code Here

    try {
      // 保存为备份文件
      File tf = new File(configFile.getAbsolutePath() + ".back"+ StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      log.debug("backup file ->" + tf.getAbsolutePath());
      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,ORMConfigBeanCreator.getORMBean());
      writer.setBeanName("orm");
      writer.setClass("orm", ORMConfigBean.class);
      writer.write();
      StringBuilder sb = new StringBuilder(ConfigInfoCons.REPAIR_INFO);
      sb.append(err);
      error = sb.toString();

      log.error(error);
View Full Code Here

          + StringUtil.getNowTime("_MMddHHmmss"));
      FileUtil.copy(configFile, tf);
      LogFactory.getMVCLogger("INFO").write(
          "backup file->" + tf.getAbsolutePath());

      XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(configFile,
          MVCConfigBeanCreator.getInterBean());
      writer.setBeanName("interceptor");
      writer.setClass("interceptor", InterConfigBean.class);
      writer.write();

      StringBuilder tsb = new StringBuilder(
          "InterConfig.class : 配置文件读取错误,已重写。异常捕获:");
      tsb.append(sb.toString());
      LogFactory.getMVCLogger("ERROR").write(tsb.toString());
View Full Code Here

        // 重写配置文件
        try {
          // 保存为备份文件
          FileUtil.copy(file, new File(startXmlPath + ".back" + "_"
              + StringUtil.getNowTime("MMddHHmmss")));
          XMLWriter writer = BeanXMLUtil.getBeanXMLWriter(file,
              ConfigBeanCreator.getConfigBean());
          writer.setBeanName("eweb4j");
          writer.setClass("eweb4j", ConfigBean.class);
          writer.write();
          String info = "配置文件读取错误,已重写。";
          error = StringUtil.getNowTime() + "EWeb4JConfig : " + info
              + "异常捕获:" + StringUtil.getExceptionString(e);
          LogFactory.getConfigLogger("ERROR").write(info);
          e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.eweb4j.util.xml.XMLWriter

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.