diff --git a/pom.xml b/pom.xml
index 8664950..c74fb6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,24 +12,11 @@
Tigon
Tigon
-
- me.chyxion
- maven-parent
- 0.0.2-RELEASE
-
-
1.8
1.8
- 4.3.8.RELEASE
- 1.5.10.RELEASE
- 1.7.23
- 2.7
- 1.3.2
- 1.8.10
- Main
- 8080
- /
+ 5.0.7.RELEASE
+ 2.0.3.RELEASE
@@ -48,36 +35,24 @@
-
tigon-model
tigon-mybatis
tigon-sequence
- tigon-redis
tigon-mybatis-cache-redis
tigon-shiro-cache
tigon-shiro-cache-redis
- tigon-webmvc-core
- tigon-webmvc-spring-boot
- tigon-webmvc-war
tigon-shiro-core
- tigon-shiro-spring-boot
- tigon-shiro-war
+ tigon-shiro-cas
+ tigon-shiro
+ tigon-web
tigon-service-api
tigon-service-support
- tigon-props-config
tigon-extjs
- tigon-freemarker-support
- tigon-jsp-support
tigon-codegen
-
- me.chyxion.tigon
- tigon-lombok
- ${project.version}
-
me.chyxion.tigon
tigon-model
@@ -95,22 +70,7 @@
me.chyxion.tigon
- tigon-webmvc-core
- ${project.version}
-
-
- me.chyxion.tigon
- tigon-webmvc-spring-boot
- ${project.version}
-
-
- me.chyxion.tigon
- tigon-webmvc-war
- ${project.version}
-
-
- me.chyxion.tigon
- tigon-redis
+ tigon-web
${project.version}
@@ -120,12 +80,12 @@
me.chyxion.tigon
- tigon-shiro-cache-redis
+ tigon-shiro-cache
${project.version}
me.chyxion.tigon
- tigon-shiro-cache
+ tigon-shiro-cache-redis
${project.version}
@@ -135,12 +95,12 @@
me.chyxion.tigon
- tigon-shiro-spring-boot
+ tigon-shiro
${project.version}
me.chyxion.tigon
- tigon-shiro-war
+ tigon-shiro-cas
${project.version}
@@ -158,112 +118,31 @@
tigon-extjs
${project.version}
-
- me.chyxion.tigon
- tigon-freemarker-support
- ${project.version}
-
-
- me.chyxion.tigon
- tigon-jsp-support
- ${project.version}
-
me.chyxion.tigon
tigon-codegen
${project.version}
-
- me.chyxion.tigon
- tigon-props-config
- ${project.version}
-
org.projectlombok
lombok
- 1.16.14
-
-
- org.hibernate
- hibernate-validator
- 5.4.0.Final
-
-
-
- commons-beanutils
- commons-beanutils
- 1.9.3
-
-
-
- org.mybatis
- mybatis
- 3.4.2
-
-
- org.mybatis
- mybatis-spring
- 1.3.1
-
-
-
- mysql
- mysql-connector-java
- 5.1.6
-
-
- com.alibaba
- druid
- 1.0.28
-
-
- org.mongodb
- bson
- 3.4.2
-
-
- redis.clients
- jedis
- 2.9.0
-
-
-
- org.apache.shiro
- shiro-core
- ${shiro.version}
-
-
- org.apache.shiro
- shiro-web
- ${shiro.version}
-
-
- org.apache.shiro
- shiro-spring
- ${shiro.version}
-
-
- commons-fileupload
- commons-fileupload
- 1.3.2
-
-
-
- cglib
- cglib
- 3.2.4
-
-
- org.aspectj
- aspectjrt
- ${aspectj.version}
-
-
- org.aspectj
- aspectjweaver
- ${aspectj.version}
+ 1.18.0
+
+ org.springframework
+ spring-framework-bom
+ ${spring.version}
+ pom
+ import
+
+
+ org.springframework.data
+ spring-data-releasetrain
+ Kay-SR2
+ pom
+ import
+
org.springframework.boot
spring-boot-dependencies
@@ -272,366 +151,33 @@
import
- org.springframework.boot
- spring-boot-starter
-
-
- org.springframework.boot
- spring-boot-starter-logging
-
-
+ cglib
+ cglib
+ 3.2.4
-
- org.jdom
- jdom
- 1.1.3
-
-
- com.alibaba
- fastjson
- 1.2.31
-
-
- org.apache.commons
- commons-lang3
- 3.1
-
-
- commons-io
- commons-io
- 2.4
-
-
- org.freemarker
- freemarker
- 2.3.23
-
-
- commons-codec
- commons-codec
- 1.10
-
-
- commons-logging
- commons-logging
- 1.2
-
-
-
- junit
- junit
- 4.12
-
-
-
- org.slf4j
- slf4j-api
- ${slf4j.version}
-
-
- org.slf4j
- jcl-over-slf4j
- ${slf4j.version}
-
-
-
- org.apache.logging.log4j
- log4j-api
- ${log4j.version}
-
-
- org.apache.logging.log4j
- log4j-core
- ${log4j.version}
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
- ${log4j.version}
-
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
-
-
- javax.el
- javax.el-api
- 3.0.0
-
-
- javax.servlet.jsp.jstl
- jstl-api
- 1.2
-
- org.apache.maven.plugins
- maven-clean-plugin
-
-
- com.coderplus.maven.plugins
- copy-rename-maven-plugin
-
-
- org.apache.maven.plugins
- maven-resources-plugin
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- org.apache.maven.plugins
- maven-source-plugin
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ true
+
-
- org.codehaus.mojo
- cobertura-maven-plugin
- 2.7
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 2.7
-
- ${project.build.sourceEncoding}
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- ${maven.compiler.source}
- ${maven.compiler.target}
- ${project.build.sourceEncoding}
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.4
-
-
- attach-sources
-
- jar
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.10
-
-
- copy-dependencies
- package
-
- copy-dependencies
-
-
-
- target/lib
-
- provided
- runtime
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 2.6
-
-
-
- true
- true
- true
-
-
- Shaun Chyxion
-
-
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 2.3
-
-
- package
-
- shade
-
-
- ${project.artifactId}
- true
- jar-with-dependencies
-
-
- ${main.class}
-
-
- META-INF/spring.handlers
-
-
- META-INF/spring.schemas
-
-
- META-INF/spring.tooling
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-clean-plugin
- 2.6.1
-
-
- remove-config-file
- clean
- compile
-
- true
-
-
- src/main/resources/spring
-
- config.properties
-
-
-
- src/main/resources
-
- application.properties
- application.yaml
- log4j2.xml
-
-
-
-
-
-
-
-
- com.coderplus.maven.plugins
- copy-rename-maven-plugin
- 1.0
-
-
- copy-config-props-file
- generate-resources
-
- copy
-
-
- src/main/resources/config_${project.activeProfiles[0].id}.properties
- src/main/resources/spring/config.properties
-
-
-
- copy-application-props-file
- generate-resources
-
- copy
-
-
- src/main/resources/application_${project.activeProfiles[0].id}.properties
- src/main/resources/application.properties
-
-
-
- copy-application-yaml-file
- generate-resources
-
- copy
-
-
- src/main/resources/application_${project.activeProfiles[0].id}.yaml
- src/main/resources/application.yaml
-
-
-
- copy-log4j2-xml-file
- generate-resources
-
- copy
-
-
- src/main/resources/log4j2_${project.activeProfiles[0].id}.xml
- src/main/resources/log4j2.xml
-
-
-
-
-
- org.apache.maven.plugins
- maven-war-plugin
- 2.6
-
- 3.0
-
-
- src/main/webapp
-
-
-
-
-
- org.apache.tomcat.maven
- tomcat7-maven-plugin
- 2.2
-
- ${maven.tomcat.port}
- ${maven.tomcat.path}
- utf-8
- utf-8
- false
-
- ${maven.tomcat.port}
- ${project.basedir}
-
-
-
org.springframework.boot
spring-boot-maven-plugin
${spring-boot.version}
true
- ${start-class}
ZIP
-
- -Xdebug
- -Dproject.basedir=${project.basedir}
-
@@ -641,37 +187,6 @@
-
- org.apache.maven.plugins
- maven-help-plugin
- 2.2
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
- org.apache.maven.plugins
- maven-clean-plugin
-
- [2.6.1,)
-
-
- clean
-
-
-
-
-
-
-
-
-
-
diff --git a/tigon-codegen-spring-boot-test b/tigon-codegen-spring-boot-test
deleted file mode 160000
index a7c6906..0000000
--- a/tigon-codegen-spring-boot-test
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a7c690619e09fae1d48584794d68d1b8ee78c197
diff --git a/tigon-codegen-war-test b/tigon-codegen-war-test
deleted file mode 160000
index a7c6906..0000000
--- a/tigon-codegen-war-test
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit a7c690619e09fae1d48584794d68d1b8ee78c197
diff --git a/tigon-codegen/pom.xml b/tigon-codegen/pom.xml
index a7db588..7584e96 100644
--- a/tigon-codegen/pom.xml
+++ b/tigon-codegen/pom.xml
@@ -17,10 +17,19 @@
../
+
+ me.chyxion.tigon.codegen.TigonCodeGen
+ me.chyxion.tigon.codegen.TigonCodeGen
+
+
- me.chyxion.tigon
- tigon-freemarker-support
+ org.freemarker
+ freemarker
+
+
+ org.springframework
+ spring-context-support
me.chyxion.tigon
@@ -28,29 +37,32 @@
me.chyxion.tigon
- tigon-webmvc-core
+ tigon-web
me.chyxion.tigon
tigon-service-support
-
- org.springframework
- spring-jdbc
-
-
- org.springframework
- spring-context-support
-
commons-io
commons-io
+ 2.6
me.chyxion.tigon
tigon-mybatis
+
+ mysql
+ mysql-connector-java
+ 5.1.6
+
+
+ com.alibaba
+ druid
+ 1.1.10
+
org.projectlombok
lombok
@@ -58,14 +70,23 @@
- org.springframework
- spring-test
- provided
-
-
- junit
- junit
+ org.springframework.boot
+ spring-boot-starter-test
provided
+
+
+ codegen
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ false
+ true
+
+
+
+
diff --git a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/TigonCodeGen.java b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/TigonCodeGen.java
new file mode 100644
index 0000000..bb23368
--- /dev/null
+++ b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/TigonCodeGen.java
@@ -0,0 +1,23 @@
+package me.chyxion.tigon.codegen;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @author Shaun Chyxion
+ * chyxion@163.com
+ * Jun 24, 2018 20:43:36
+ */
+@Slf4j
+@SpringBootApplication
+public class TigonCodeGen {
+
+ /**
+ * @param args start args
+ */
+ public static void main(final String[] args) {
+ log.info("Startup args [{}].", args);
+ SpringApplication.run(TigonCodeGen.class, args);
+ }
+}
diff --git a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/WebConfig.java b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/WebConfig.java
new file mode 100644
index 0000000..7539b1a
--- /dev/null
+++ b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/WebConfig.java
@@ -0,0 +1,23 @@
+package me.chyxion.tigon.codegen;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+
+/**
+ * @author Shaun Chyxion
+ * chyxion@163.com
+ * Jun 24, 2018 20:58:08
+ */
+@Configuration
+public class WebConfig implements WebMvcConfigurer {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void addResourceHandlers(final ResourceHandlerRegistry registry) {
+ registry.addResourceHandler("/assets/**")
+ .addResourceLocations("/assets/", "classpath:webapp/assets/");
+ }
+}
diff --git a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/controller/CodeGenController.java b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/controller/CodeGenController.java
index 28a6181..6073db5 100644
--- a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/controller/CodeGenController.java
+++ b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/controller/CodeGenController.java
@@ -9,9 +9,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.StringUtils;
+import javax.validation.constraints.NotBlank;
+
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;
-import org.hibernate.validator.constraints.NotBlank;
import me.chyxion.tigon.codegen.service.CodeGenService;
import me.chyxion.tigon.codegen.service.CodeGenBaseTool;
import org.springframework.web.bind.annotation.RequestParam;
@@ -35,11 +37,16 @@ public class CodeGenController {
private CodeGenService service;
@Autowired
private CodeGenBaseTool tool;
+ @Value("${codegen.components:}")
+ private String genComponents;
@RequestMapping(method = GET)
public ModelAndView index() {
return new ModelAndView("webapp/views/codegen")
- .addObject("pkg", tool.getPkg());
+ .addObject("pkg", tool.getPkg())
+ .addObject("components",
+ StringUtils.isNotBlank(genComponents) ?
+ JSON.toJSONString(genComponents.split("\\s*[,;]\\s*")) : "[]");
}
@RequestMapping(value = "/tables")
diff --git a/tigon-freemarker-support/src/main/java/me/chyxion/tigon/freemarker/FreeMarkerViewResolverExt.java b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/freemarker/FreeMarkerViewResolverExt.java
similarity index 62%
rename from tigon-freemarker-support/src/main/java/me/chyxion/tigon/freemarker/FreeMarkerViewResolverExt.java
rename to tigon-codegen/src/main/java/me/chyxion/tigon/codegen/freemarker/FreeMarkerViewResolverExt.java
index f06fc92..8e76d27 100644
--- a/tigon-freemarker-support/src/main/java/me/chyxion/tigon/freemarker/FreeMarkerViewResolverExt.java
+++ b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/freemarker/FreeMarkerViewResolverExt.java
@@ -1,8 +1,7 @@
-package me.chyxion.tigon.freemarker;
+package me.chyxion.tigon.codegen.freemarker;
import java.util.Locale;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import lombok.extern.slf4j.Slf4j;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
@@ -13,9 +12,8 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
* chyxion@163.com
* Dec 5, 2014 2:31:39 PM
*/
+@Slf4j
public class FreeMarkerViewResolverExt extends FreeMarkerViewResolver {
- private static final Logger log =
- LoggerFactory.getLogger(FreeMarkerViewResolverExt.class);
/**
* {@inheritDoc}
@@ -23,7 +21,7 @@ public class FreeMarkerViewResolverExt extends FreeMarkerViewResolver {
@Override
public View resolveViewName(String viewName, Locale locale)
throws Exception {
- log.debug("Try To Resolve View Name [{}], Locale [{}] As FreeMarker View.", viewName, locale);
- return super.resolveViewName(viewName.replaceAll("(?i)(^\\s*ftl\\:)|(\\.ftl\\s*$)", ""), locale);
+ log.debug("Try to resolve view name [{}], locale [{}] as freemarker view.", viewName, locale);
+ return super.resolveViewName(viewName.replaceAll("(?i)(^\\s*ftl:)|(\\.ftl\\s*$)", ""), locale);
}
}
diff --git a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/service/CodeGenBaseTool.java b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/service/CodeGenBaseTool.java
index fc56d91..80576b0 100644
--- a/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/service/CodeGenBaseTool.java
+++ b/tigon-codegen/src/main/java/me/chyxion/tigon/codegen/service/CodeGenBaseTool.java
@@ -1,41 +1,25 @@
package me.chyxion.tigon.codegen.service;
import java.io.File;
-import java.util.Map;
-import java.util.Set;
-import java.util.Date;
-import java.util.List;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import java.util.TreeSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
+import java.util.*;
import java.io.FileWriter;
import java.sql.ResultSet;
-import org.w3c.dom.Element;
import java.io.IOException;
-import java.io.InputStream;
import java.sql.Connection;
-import java.util.Properties;
-import java.util.LinkedList;
-import javax.sql.DataSource;
import java.sql.SQLException;
import java.io.FileInputStream;
-import org.slf4j.LoggerFactory;
+import lombok.extern.slf4j.Slf4j;
import java.sql.DatabaseMetaData;
import com.alibaba.fastjson.JSON;
import java.io.InputStreamReader;
import me.chyxion.tigon.model.M1;
import freemarker.template.Template;
import org.apache.commons.io.IOUtils;
-import javax.annotation.PostConstruct;
import org.apache.commons.io.FileUtils;
import me.chyxion.tigon.util.WordUtils;
+import java.nio.charset.StandardCharsets;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.CharEncoding;
-import me.chyxion.tigon.codegen.utils.DbTool;
-import javax.xml.parsers.DocumentBuilderFactory;
+import me.chyxion.tigon.codegen.util.DbTool;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.JdbcUtils;
import org.springframework.dao.DataAccessException;
@@ -46,7 +30,6 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.freemarker.FreeMarkerTemplateUtils;
-import static org.springframework.context.ConfigurableApplicationContext.*;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
/**
@@ -56,92 +39,21 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
* chyxion@163.com
* Dec 3, 2014 11:25:17 AM
*/
+@Slf4j
public class CodeGenBaseTool {
- private static final Logger log =
- LoggerFactory.getLogger(CodeGenBaseTool.class);
@Autowired
private FreeMarkerConfigurer fmCfg;
- @Autowired(required = false)
- private DataSource dataSource;
+ @Autowired
private JdbcTemplate jdbcTpl;
- @Value("#{systemProperties['project.basedir']}")
+ @Value("${project.base-dir}")
private String projDir;
- private String groupId;
+ @Value("${project.base-package}")
private String pkg;
- private Properties config = new Properties();
- private Set baseCols = new HashSet();
+ @Value("${codegen.table-prefix:}")
+ private String tablePrefix;
- /**
- * @param col
- * @return true if col is base col
- */
- public boolean isBaseCol(String col) {
- return baseCols.contains(col);
- }
-
- /**
- * @param key
- * @return
- */
- public String getConfig(String key) {
- return config.getProperty(key);
- }
-
- /**
- * @param key
- * @param defaultValue
- * @return
- */
- public String getConfig(String key, String defaultValue) {
- return config.getProperty(key, defaultValue);
- }
-
- /**
- * get config
- * @param key
- * @param defaultValue
- * @return
- */
- public boolean getConfig(String key, boolean defaultValue) {
- return Boolean.valueOf(getConfig(key, String.valueOf(defaultValue)));
- }
-
- /**
- * @param key
- * @param defaultValue
- * @return
- */
- public int getConfig(String key, int defaultValue) {
- return Integer.valueOf(getConfig(key, String.valueOf(defaultValue)));
- }
-
- /**
- * @param key
- * @param defaultValue
- * @return
- */
- public long getConfig(String key, long defaultValue) {
- return Long.valueOf(getConfig(key, String.valueOf(defaultValue)));
- }
-
- /**
- * @param key
- * @param defaultValue
- * @return
- */
- public double getConfig(String key, double defaultValue) {
- return Double.valueOf(getConfig(key, String.valueOf(defaultValue)));
- }
-
- /**
- * @param key
- * @param defaultValue
- * @return
- */
- public float getConfig(String key, float defaultValue) {
- return Float.valueOf(getConfig(key, String.valueOf(defaultValue)));
- }
+ private Set baseCols = new HashSet<>();
/**
* @return the projDir
@@ -150,13 +62,6 @@ public class CodeGenBaseTool {
return projDir;
}
- /**
- * @return the groupId
- */
- public String getGroupId() {
- return groupId;
- }
-
/**
* @return the groupId
*/
@@ -193,63 +98,6 @@ public class CodeGenBaseTool {
}
}
- /**
- * init config
- */
- @PostConstruct
- void init() {
- // disable cache
- log.info("Disable FreeMarker Cache In Dev Mode.");
- fmCfg.getConfiguration().setTemplateUpdateDelayMilliseconds(0);
- if (dataSource != null) {
- jdbcTpl = new JdbcTemplate(dataSource, true);
- }
-
- try {
- log.info("Parse Group ID From [{}/pom.xml].", projDir);
- Element root = DocumentBuilderFactory.newInstance()
- .newDocumentBuilder()
- .parse(new File(projDir, "pom.xml"))
- .getDocumentElement();
- root.normalize();
- groupId = root.getElementsByTagName("groupId").item(0).getTextContent().trim();
- log.info("Group ID [{}] Found.", groupId);
- }
- catch (Exception e) {
- throw new IllegalStateException(
- "Parse [groupId] From Maven POM File [" + projDir + "/pom.xml] Error Caused", e);
- }
-
- InputStream cfgIns = CodeGenBaseTool.class
- .getResourceAsStream("/codegen/config.properties");
- if (cfgIns != null) {
- try {
- config.load(cfgIns);
- log.info("Code Gen Config [{}] Found.", config);
- }
- catch (IOException e) {
- throw new IllegalStateException(
- "Load Code Gen Config Error Caused", e);
- }
- finally {
- IOUtils.closeQuietly(cfgIns);
- }
- }
-
- baseCols.add("id");
- String baseColsProp = config.getProperty("base.cols");
- if (StringUtils.isNotBlank(baseColsProp)) {
- log.info("Code Gen Base Cols [{}] Found.", baseColsProp);
- baseCols.addAll(Arrays.asList(
- org.springframework.util.StringUtils
- .tokenizeToStringArray(
- baseColsProp, CONFIG_LOCATION_DELIMITERS, true, true)));
- }
- log.info("Code Gen Base Cols [{}] Result.", baseCols);
- pkg = config.getProperty("base.package", groupId);
- log.info("Code Gen Package [{}].", pkg);
- }
-
/**
* list all model generated
* @return
@@ -270,7 +118,7 @@ public class CodeGenBaseTool {
FileInputStream fin = null;
try {
fin = new FileInputStream(file);
- mapData = JSON.parseObject(IOUtils.toString(fin, CharEncoding.UTF_8));
+ mapData = JSON.parseObject(IOUtils.toString(fin, StandardCharsets.UTF_8));
}
catch (IOException e) {
log.info("Parse JSON File [{}] ERROR Caused.", file.getName());
@@ -284,7 +132,7 @@ public class CodeGenBaseTool {
// backup data file
IOUtils.copy(fin,
new FileWriter(new File(projDir, backupFileName)),
- CharEncoding.UTF_8);
+ StandardCharsets.UTF_8);
}
}
catch (IOException e1) {
@@ -296,8 +144,8 @@ public class CodeGenBaseTool {
}
}
if (mapData == null) {
- mapData = new HashMap();
- mapData.put("items", new LinkedList