class CodeController {

    @RequestMapping("/download")
    public String download(@RequestParam(value = "projectId") Long projectId, HttpServletResponse response) throws Exception {
        File file = new File(new File(consts.codeConsoleilePath, String.valueOf(projectId)), CodeGenConsts.JAVA);
        Project project = projectDao.getProjectByID(projectId);
        String date = DateUtil.getCurrentTime();
        final String zipFileName = project.getName() + "-" + date + ".zip";
        return FileUtils.download(response, file, zipFileName, consts.codeConsoleilePath);
    }

}