Search in sources :

Example 1 with GenerateCodeParam

use of com.free.framework.code.tools.param.GenerateCodeParam in project free-framework by a601942905git.

the class CodeToolController method generateCodeTool.

@GetMapping(CodeToolControllerMappingURL.CODE_TOOL)
@ResponseBody
public int generateCodeTool() throws Exception {
    int count = 0;
    GenerateCodeParam generateCodeParam = buildGenerateCodeParam();
    DataBase2File dataBase2File = new DataBase2File(generateCodeParam);
    try {
        dataBase2File.generateFiles();
        count = 1;
    } catch (IOException e) {
        log.error("【CodeToolController中generateCodeTool,IO异常】{}", e);
    } catch (ClassNotFoundException e) {
        log.error("【CodeToolController中generateCodeTool,ClassNotFoundException异常】{}", e);
    } catch (SQLException e) {
        log.error("【CodeToolController中generateCodeTool,SQLException异常】{}", e);
    }
    return count;
}
Also used : DataBase2File(com.free.framework.code.tools.DataBase2File) SQLException(java.sql.SQLException) GenerateCodeParam(com.free.framework.code.tools.param.GenerateCodeParam) IOException(java.io.IOException) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 2 with GenerateCodeParam

use of com.free.framework.code.tools.param.GenerateCodeParam in project free-framework by a601942905git.

the class DataBase2File method main.

public static void main(String[] args) throws IOException, ClassNotFoundException, SQLException {
    DataBase2File reverser = new DataBase2File(new GenerateCodeParam());
    reverser.generateFiles();
}
Also used : GenerateCodeParam(com.free.framework.code.tools.param.GenerateCodeParam)

Aggregations

GenerateCodeParam (com.free.framework.code.tools.param.GenerateCodeParam)2 DataBase2File (com.free.framework.code.tools.DataBase2File)1 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1