@@ -0,0 +1,906 @@
+package dw.services;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.UnsupportedEncodingException;%0A%0Aimport org.springframework.stereotype.Service;%0A%0A/**%0A * FileService.java %3Cbr%3E%0A * comment%0A * %0A * @author Sunny (tufeiping@gmail.com)%0A * @version 2014%E5%B9%B49%E6%9C%882%E6%97%A5 %E4%B8%8A%E5%8D%8811:05:45%0A */%0A%0A@Service%0Apublic class FileService %7B%0A    private boolean folderSafeCheck(File folder) %7B%0A        if (!folder.exists()) %7B%0A            folder.mkdirs();%0A        %7D%0A        return folder.exists();%0A    %7D%0A%0A    public void saveDockerFile(File folder, String content)%0A            throws UnsupportedEncodingException, IOException %7B%0A        if (!folderSafeCheck(folder))%0A            return;%0A        FileOutputStream dockerFile = new FileOutputStream(%0A                folder.getAbsolutePath() + %22/Dockerfile%22);%0A        dockerFile.write(content.getBytes(%22UTF-8%22));%0A        dockerFile.close();%0A    %7D%0A%0A%7D%0A

add file service