MongoDBDataSource.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:STEM 作者:
@Override
  public void writeConfig(ConfigWriter cw) {
      final String name = "data-source";
      String klass = getClass().getName();

      AttributeListImpl attribs = new AttributeListImpl();
      attribs.addAttribute("class", "CDATA", klass);
      cw.writeStartElement(name, attribs);

      cw.writeParam("server-address", getServerAddress());
      cw.writeParam("port-number", getPortNumber());
      cw.writeParam("user-name", getUserName());
      cw.writeParam("password", getPassword());
      cw.writeParam("db-auth", getDbAuth());
      cw.writeParam("database", getDatabase());
      cw.writeParam("cursor-notimeout", getCursorNotimeout());
      cw.writeParam("collection", getCollection());
      cw.writeParam("query", getQuery());
      cw.writeParam("projection", getProjection());

    cw.writeEndElement(name);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号