Exemple #1
0
  private static String buildMysqlJdbcUrl(JdbcInfo jdbcInfo) {
    StringBuilder sb = new StringBuilder();

    sb.append("jdbc:mysql://");
    sb.append(jdbcInfo.getHost());
    sb.append(":");
    sb.append(jdbcInfo.getPort());
    sb.append("/");
    sb.append(jdbcInfo.getDbName());
    sb.append("?user="******"&password=");
    sb.append(jdbcInfo.getUserPass());

    return sb.toString();
  }
Exemple #2
0
  public static String buildJdbcUrl() {
    String jdbcUrl = null;
    JdbcInfo jdbcInfo = JdbcInfo.getInstance();

    jdbcUrl = buildMysqlJdbcUrl(jdbcInfo);

    return jdbcUrl;
  }