pingfangushi / screw Goto Github PK
View Code? Open in Web Editor NEW简洁好用的数据库表结构文档生成器
License: GNU Lesser General Public License v3.0
简洁好用的数据库表结构文档生成器
License: GNU Lesser General Public License v3.0
mysql 连接也加了 ?characterEncoding=UTF-8
但还是中文乱码
结果如下:https://www.jianshu.com/p/8960406d6a97
啥时候支持:达梦、人大金仓数据库就好了,现在的信创项目越来越多了,希望作者关注下,多谢!
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]
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]
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
原因是Freemarker版本不对,但是你们源码是这个版本,引入的不是这个版本
这样做即可
<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>
README.md文件 markdown 单词错误
页面太丑了
用了一下这个工具生成文档,感觉还不错,但是文档没有生成索引信息,后面看能否增加这个功能?
作者能不能支持下excel格式的导出
大佬,支持记录表结构变更吗
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
导入 maven 后提示 DmDataBaseQuery:47 编码不通过,
程序包dm.jdbc.driver不存在
import dm.jdbc.driver.DmdbConnection;
DDL 如下:
create table t_test(
content VARCHAR(255) NOT NULL DEFAULT ''
);
生成的 HTML 格式文档中默认值一栏是空的,期望展示成 ''
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)
请问下为啥没有生成自己创建的表?是需要配置什么吗?我用的是sql service
看了这个介绍,想用但是不知道怎么用才好。能不能提供一个初学者的教程,我是下载代码以后就能运行起来吗?配置数据库链接就可以生成吗?
很多大型企业还在用这个数据库,比如保险公司。。
建议md模板的表头分隔符补全三个“-”号
您好,有规划支持MongoDB的嘛?
"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
如题。 比如在idea 内置的 datasource 上右键, 点击 context menu 里的 "generate markdown file to", 给个弹窗,选择目标位置。就自动生成那些包含数据库文档的markdown文件了。
似乎需要Download到本地自己部署,如果没有Java环境就跑不起来了,希望能有一个演示站点或官网,比较规范一些。感谢作者的贡献。
是否可以支持pg分区表
目前只支持 jar 包形式,嵌套到 java 应用中吗? 可以不可以直接连接数据库生成文档的
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)
大佬,能不能支持多类型导出,比如同时导出html,word,md三种类型呢。
好像只支持HikariDataSource,能支持DruidDataSource吗?
您好,使用screw-core 1.0.3配合Orace19c、springbootstarterparent 2.2.4release时导出表结构,对于未指定精度、长度的number字段,会出现小数位显示为“-127”的情况
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.