diff --git a/src/main/resources/modules/SpringBoot/resources/table.ftl b/src/main/resources/modules/SpringBoot/resources/table.ftl index ae19712c..19dd058b 100644 --- a/src/main/resources/modules/SpringBoot/resources/table.ftl +++ b/src/main/resources/modules/SpringBoot/resources/table.ftl @@ -15,9 +15,9 @@ CREATE TABLE "${module.modulePrefix}${table.tableName}" ( ); -COMMENT ON TABLE ${module.modulePrefix?default("")}${table.tableName} is '${table.tableComment}'; +COMMENT ON TABLE "${module.modulePrefix?default("")}${table.tableName}" is '${table.tableComment}'; <#list table.fields as field> -COMMENT ON COLUMN ${module.modulePrefix?default("")}${table.tableName}.${field.fieldName?default("")} is '${field.fieldComment?default("")}'; +COMMENT ON COLUMN "${module.modulePrefix?default("")}${table.tableName}"."${field.fieldName?default("")}" is '${field.fieldComment?default("")}'; <#if dataBase == 'MYSQL'> diff --git a/src/main/resources/modules/SpringBoot/resources/tableAll.ftl b/src/main/resources/modules/SpringBoot/resources/tableAll.ftl index 1c2926d5..9f31b754 100644 --- a/src/main/resources/modules/SpringBoot/resources/tableAll.ftl +++ b/src/main/resources/modules/SpringBoot/resources/tableAll.ftl @@ -8,9 +8,9 @@ CREATE TABLE "${module.modulePrefix?default("")}${table.tableName}" ( ${dBmapper.getFieldSql(field)}<#if field_has_next>, ); -COMMENT ON TABLE ${module.modulePrefix?default("")}${table.tableName} is '${table.tableComment?default("")}'; +COMMENT ON TABLE "${module.modulePrefix?default("")}${table.tableName}" is '${table.tableComment?default("")}'; <#list table.fields as field> -COMMENT ON COLUMN ${module.modulePrefix?default("")}${table.tableName}.${field.fieldName?default("")} is '${field.fieldComment?default("")}'; +COMMENT ON COLUMN "${module.modulePrefix?default("")}${table.tableName}"."${field.fieldName?default("")}" is '${field.fieldComment?default("")}'; diff --git a/src/main/resources/modules/SpringBoot/test/TestConfig.ftl b/src/main/resources/modules/SpringBoot/test/TestConfig.ftl index 01001473..d5e1bab7 100644 --- a/src/main/resources/modules/SpringBoot/test/TestConfig.ftl +++ b/src/main/resources/modules/SpringBoot/test/TestConfig.ftl @@ -9,8 +9,8 @@ public class TestConfig { @Bean public Token getTestToken() { Token token = new Token(); - token.setId(-1); - token.setUserId(-1); + token.setId(0); + token.setUserId(0); token.setUserName("system"); return token; } diff --git a/src/main/resources/modules/SpringBoot/test/application.properties b/src/main/resources/modules/SpringBoot/test/application.properties index 1bc85147..f28d3e71 100644 --- a/src/main/resources/modules/SpringBoot/test/application.properties +++ b/src/main/resources/modules/SpringBoot/test/application.properties @@ -41,6 +41,12 @@ pagehelper.autoRuntimeDialect=true pagehelper.reasonable=true pagehelper.supportMethodsArguments=true pagehelper.params=count=countSql +# jackson 相关配置 +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss +spring.jackson.time-zone=GMT+8 +spring.jackson.default-property-inclusion=use_defaults +spring.jackson.mapper.sort-properties-alphabetically=true +spring.jackson.deserialization.fail-on-unknown-properties=false # freemarker spring.freemarker.enabled=true spring.freemarker.allow-request-override=false @@ -61,5 +67,5 @@ spring.freemarker.settings.whitespace_stripping=true spring.freemarker.settings.url_escaping_charset=utf-8 # 文件上传配置 spring.servlet.multipart.resolveLazily = true -spring.servlet.multipart.max-file-size=100Mb -spring.servlet.multipart.max-request-size=100Mb \ No newline at end of file +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB \ No newline at end of file diff --git a/src/main/resources/modules/SpringBoot/test/test.ftl b/src/main/resources/modules/SpringBoot/test/test.ftl index 2240c021..e6710907 100644 --- a/src/main/resources/modules/SpringBoot/test/test.ftl +++ b/src/main/resources/modules/SpringBoot/test/test.ftl @@ -47,6 +47,7 @@ public class ${table.getCName()}Test { } <#if table.getDelete()> + @Test public void testDelete() {