apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/ConfigsExportController.java/ConfigsExportController/exportAll
class ConfigsExportController:  @GetMapping("/configs/export")
  public void exportAll(@RequestParam(value = "envs") String envs,
                        HttpServletRequest request, HttpServletResponse response) throws IOException {
    // filename must contain the information of time
    final String filename = "apollo_config_export_" + DateFormatUtils.format(new Date(), "yyyy_MMdd_HH_mm_ss") + ".zip";
    // log who download the configs
    logger.info("Download configs, remote addr [{}], remote host [{}]. Filename is [{}]", request.getRemoteAddr(),
                request.getRemoteHost(), filename);
    // set downloaded filename
    response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;filename=" + filename);

    List<Env>
        exportEnvs =
        Splitter.on(ENV_SEPARATOR).splitToList(envs).stream().map(env -> Env.valueOf(env)).collect(Collectors.toList());

    try (OutputStream outputStream = response.getOutputStream()) {
      configsExportService.exportData(outputStream, exportEnvs);
    }
  }