mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2025-12-26 05:48:33 +08:00
log.info优化/pom version update
This commit is contained in:
parent
7a4ee452eb
commit
7edeea0247
@ -7,10 +7,9 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.softdev.system</groupId>
|
<groupId>com.softdev.system</groupId>
|
||||||
<artifactId>SpringBootCodeGenerator</artifactId>
|
<artifactId>SpringBootCodeGenerator</artifactId>
|
||||||
<version>2.0</version>
|
<version>3.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>com.softdev.system</groupId>
|
|
||||||
<artifactId>generator-web</artifactId>
|
<artifactId>generator-web</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.softdev.system.generator.controller;
|
package com.softdev.system.generator.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.softdev.system.generator.entity.ClassInfo;
|
import com.softdev.system.generator.entity.ClassInfo;
|
||||||
import com.softdev.system.generator.entity.ParamInfo;
|
import com.softdev.system.generator.entity.ParamInfo;
|
||||||
import com.softdev.system.generator.entity.ReturnT;
|
import com.softdev.system.generator.entity.ReturnT;
|
||||||
@ -15,6 +14,7 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,8 +52,7 @@ public class GeneratorController {
|
|||||||
@PostMapping("/code/generate")
|
@PostMapping("/code/generate")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public ReturnT generateCode(@RequestBody ParamInfo paramInfo) throws Exception {
|
public ReturnT generateCode(@RequestBody ParamInfo paramInfo) throws Exception {
|
||||||
|
//log.info(JSON.toJSONString(paramInfo.getOptions()));
|
||||||
log.info(JSON.toJSONString(paramInfo));
|
|
||||||
if (StringUtils.isEmpty(paramInfo.getTableSql())) {
|
if (StringUtils.isEmpty(paramInfo.getTableSql())) {
|
||||||
return ReturnT.error("表结构信息为空");
|
return ReturnT.error("表结构信息为空");
|
||||||
}
|
}
|
||||||
@ -85,7 +84,7 @@ public class GeneratorController {
|
|||||||
|
|
||||||
//3.generate the code by freemarker templates with parameters . Freemarker根据参数和模板生成代码
|
//3.generate the code by freemarker templates with parameters . Freemarker根据参数和模板生成代码
|
||||||
Map<String, String> result = generatorService.getResultByParams(paramInfo.getOptions());
|
Map<String, String> result = generatorService.getResultByParams(paramInfo.getOptions());
|
||||||
|
log.info("table:{} - time:{} ", MapUtil.getString(result,"tableName"),new Date());
|
||||||
return ReturnT.ok().put("outputJson",result);
|
return ReturnT.ok().put("outputJson",result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.softdev.system</groupId>
|
<groupId>com.softdev.system</groupId>
|
||||||
<artifactId>SpringBootCodeGenerator</artifactId>
|
<artifactId>SpringBootCodeGenerator</artifactId>
|
||||||
<version>2.0</version>
|
<version>3.0</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user