Giter VIP home page Giter VIP logo

screw's Issues

无法生成word,模板有问题

FTL stack trace ("~" means nesting-related):
- Failed at: #if description?trim?length gt 2 [in template "documentation_word.ftl" at line 20, column 4681]

at cn.smallbun.screw.core.util.ExceptionUtils.mpe(ExceptionUtils.java:62)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:57)
at Generate.documentGeneration(Generate.java:102)
at Generate.main(Generate.java:27)

Caused by: cn.smallbun.screw.core.exception.ScrewException: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> description [in template "documentation_word.ftl" at line 20, column 4686]


Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??


FTL stack trace ("~" means nesting-related):
- Failed at: #if description?trim?length gt 2 [in template "documentation_word.ftl" at line 20, column 4681]

at cn.smallbun.screw.core.util.ExceptionUtils.mpe(ExceptionUtils.java:62)
at cn.smallbun.screw.core.engine.freemark.FreemarkerTemplateEngine.produce(FreemarkerTemplateEngine.java:121)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:53)
... 2 more

Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
==> description [in template "documentation_word.ftl" at line 20, column 4686]


Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??


FTL stack trace ("~" means nesting-related):
- Failed at: #if description?trim?length gt 2 [in template "documentation_word.ftl" at line 20, column 4681]

at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:134)
at freemarker.core.EvalUtil.coerceModelToTextualCommon(EvalUtil.java:481)
at freemarker.core.EvalUtil.coerceModelToStringOrUnsupportedMarkup(EvalUtil.java:434)
at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:139)
at freemarker.core.BuiltInForString.getTargetString(BuiltInForString.java:34)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:101)
at freemarker.core.Expression.evalAndCoerceToStringOrUnsupportedMarkup(Expression.java:139)
at freemarker.core.BuiltInForString.getTargetString(BuiltInForString.java:34)
at freemarker.core.BuiltInForString._eval(BuiltInForString.java:29)
at freemarker.core.Expression.eval(Expression.java:101)
at freemarker.core.EvalUtil.compare(EvalUtil.java:113)
at freemarker.core.ComparisonExpression.evalToBoolean(ComparisonExpression.java:78)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
at freemarker.core.Environment.visit(Environment.java:334)
at freemarker.core.Environment.visit(Environment.java:340)
at freemarker.core.Environment.process(Environment.java:313)
at freemarker.template.Template.process(Template.java:383)
at cn.smallbun.screw.core.engine.freemark.FreemarkerTemplateEngine.produce(FreemarkerTemplateEngine.java:116)
... 3 more

java.lang.NoSuchFieldError: VERSION_2_3_30

引入依赖,执行示例代码报错
java.lang.NoSuchFieldError: VERSION_2_3_30
原因是Freemarker版本不对,但是你们源码是这个版本,引入的不是这个版本
image
这样做即可

<dependency> <groupId>cn.smallbun.screw</groupId> <artifactId>screw-core</artifactId> <version>1.0.1</version> <exclusions> <exclusion> <artifactId>freemarker</artifactId> <groupId>org.freemarker</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> <version>2.3.30</version> </dependency>

导出表数量不对

image
上述截图为navicat直接查看,显示684张表
image
使用工具导出后,只有603张表

可以生成索引信息吗?

用了一下这个工具生成文档,感觉还不错,但是文档没有生成索引信息,后面看能否增加这个功能?

maven构建时报空指针

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal cn.smallbun.screw:screw-maven-plugin:1.0.5:run (default) on project assemble-admin: Execution default of goal cn.smallbun.screw:screw-maven-plugin:1.0.5:run failed: java.lang.NullPointerException
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:274)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:196)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:160)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.mvndaemon.mvnd.builder.SmartBuilderImpl.buildProject(SmartBuilderImpl.java:178)
at org.mvndaemon.mvnd.builder.SmartBuilderImpl$ProjectBuildTask.run(SmartBuilderImpl.java:198)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal cn.smallbun.screw:screw-maven-plugin:1.0.5:run failed: java.lang.NullPointerException
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:271)
... 11 common frames omitted
Caused by: cn.smallbun.screw.core.exception.ScrewException: java.lang.NullPointerException
at cn.smallbun.screw.core.util.ExceptionUtils.mpe(ExceptionUtils.java:62)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:57)
at cn.smallbun.screw.maven.plugin.mojo.RunDocMojo.execute(RunDocMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 12 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at cn.smallbun.screw.core.process.DataModelProcess.process(DataModelProcess.java:104)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:50)
... 14 common frames omitted

达梦数据库报错

  1. 已导入jar包,并引用
  2. 使用的dm8
  3. Driver does not support get/set network timeout for connections. (null)
    image

varchar类型字段默认值丢失

DDL 如下:

create table t_test(
    content VARCHAR(255) NOT NULL DEFAULT ''
);

生成的 HTML 格式文档中默认值一栏是空的,期望展示成 ''

mysql NumberFormatException

Caused by: java.lang.NumberFormatException: null
at java.base/java.lang.Integer.parseInt(Integer.java:622)
at java.base/java.lang.Integer.parseInt(Integer.java:778)
at cn.smallbun.screw.core.query.mysql.MySqlDataBaseQuery.getTableColumns(MySqlDataBaseQuery.java:125)
at cn.smallbun.screw.core.query.mysql.MySqlDataBaseQuery.getTableColumns(MySqlDataBaseQuery.java:146)
at cn.smallbun.screw.core.process.DataModelProcess.process(DataModelProcess.java:89)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:50)

tinyint类型长度错误

数据库设计:
image
文档生成:
image
数据库实际字段类型为tinyint(1),但是1.0.5生成出来的文档为tinyint(4),1.0.4版本为tinyint(3)。

有没有具体的使用demo

看了这个介绍,想用但是不知道怎么用才好。能不能提供一个初学者的教程,我是下载代码以后就能运行起来吗?配置数据库链接就可以生成吗?

链接oracle数据库出错

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -Dmaven.multiModuleProjectDirectory=E:\screw -Dmaven.home=D:\SmartHS5Develop\apache-maven-3.5.3 -Dclassworlds.conf=D:\SmartHS5Develop\apache-maven-3.5.3\bin\m2.conf -Dmaven.ext.class.path=D:\ideaIU-2019.2.3.win\plugins\maven\lib\maven-event-listener.jar -javaagent:D:\ideaIU-2019.2.3.win\lib\idea_rt.jar=52695:D:\ideaIU-2019.2.3.win\bin -Dfile.encoding=GBK -classpath D:\SmartHS5Develop\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version2019.2.3 -s D:\SmartHS5Develop\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=D:\java\maven\repository cn.smallbun.screw:screw-maven-plugin:1.0.3:run
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< com.example:screw >--------------------------
[INFO] Building screw 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- screw-maven-plugin:1.0.3:run (default-cli) @ screw ---
[INFO] Database design document generation begins ?
[INFO] screw - Starting...
[INFO] screw - Driver does not support get/set network timeout for connections. (oracle.jdbc.driver.T4CConnection.getNetworkTimeout()I)
[INFO] screw - Start completed.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.959 s
[INFO] Finished at: 2020-10-19T15:51:31+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal cn.smallbun.screw:screw-maven-plugin:1.0.3:run (default-cli) on project screw: Execution default-cli of goal cn.smallbun.screw:screw-maven-plugin:1.0.3:run failed: An API incompatibility was encountered while executing cn.smallbun.screw:screw-maven-plugin:1.0.3:run: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.getSchema()Ljava/lang/String;
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>cn.smallbun.screw:screw-maven-plugin:1.0.3
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/D:/java/maven/repository/cn/smallbun/screw/screw-maven-plugin/1.0.3/screw-maven-plugin-1.0.3.jar
[ERROR] urls[1] = file:/D:/java/maven/repository/com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar
[ERROR] urls[2] = file:/D:/java/maven/repository/com/oracle/database/jdbc/ojdbc6/11.2.0.4/ojdbc6-11.2.0.4.jar
[ERROR] urls[3] = file:/D:/java/maven/repository/com/oracle/database/jdbc/ucp/11.2.0.4/ucp-11.2.0.4.jar
[ERROR] urls[4] = file:/D:/java/maven/repository/com/oracle/database/security/oraclepki/11.2.0.4/oraclepki-11.2.0.4.jar
[ERROR] urls[5] = file:/D:/java/maven/repository/com/oracle/database/security/osdt_cert/11.2.0.4/osdt_cert-11.2.0.4.jar
[ERROR] urls[6] = file:/D:/java/maven/repository/com/oracle/database/security/osdt_core/11.2.0.4/osdt_core-11.2.0.4.jar
[ERROR] urls[7] = file:/D:/java/maven/repository/com/oracle/database/ha/simplefan/11.2.0.4/simplefan-11.2.0.4.jar
[ERROR] urls[8] = file:/D:/java/maven/repository/com/oracle/database/ha/ons/11.2.0.4/ons-11.2.0.4.jar
[ERROR] urls[9] = file:/D:/java/maven/repository/cn/smallbun/screw/screw-core/1.0.3/screw-core-1.0.3.jar
[ERROR] urls[10] = file:/D:/java/maven/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[11] = file:/D:/java/maven/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
[ERROR] urls[12] = file:/D:/java/maven/repository/org/freemarker/freemarker/2.3.30/freemarker-2.3.30.jar
[ERROR] urls[13] = file:/D:/java/maven/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
[ERROR] urls[14] = file:/D:/java/maven/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
[ERROR] urls[15] = file:/D:/java/maven/repository/com/alibaba/fastjson/1.2.72/fastjson-1.2.72.jar
[ERROR] urls[16] = file:/D:/java/maven/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
[ERROR] urls[17] = file:/D:/java/maven/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[18] = file:/D:/java/maven/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.4/org.eclipse.sisu.inject-0.3.4.jar
[ERROR] urls[19] = file:/D:/java/maven/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[20] = file:/D:/java/maven/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

支持方式

目前只支持 jar 包形式,嵌套到 java 应用中吗? 可以不可以直接连接数据库生成文档的

postgress NullPointerException

Caused by: java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at cn.smallbun.screw.core.process.DataModelProcess.process(DataModelProcess.java:104)
at cn.smallbun.screw.core.execute.DocumentationExecute.execute(DocumentationExecute.java:50)

增强

  1. 可以支持kudu吗?
  2. 能加上表行数和所占空间大小等信息吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.