基于 screw maven 插件一键生成数据库文档
2022/1/11 19:05:51
本文主要是介绍基于 screw maven 插件一键生成数据库文档,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
一、screw 是什么
screw 是一个简洁好用的数据库表结构文档的生成工具,支持 MySQL、Oracle、PostgreSQL 等主流的关系数据库。
仓库地址是:https:// github.com/pingfangushi/screw
screw 生成的文档有 HTML、Word、Markdown 三种格式,如下:
Word:
Markdown:
二、screw 快速入门
本文的内容是基于 screw 的 maven 插件(screw-maven-plugin)来生成数据库文档,流程如下:
- 在您的project中的pom文件中引入 screw 插件。
- 在pom文件中进行一些必要的配置。
- 运行 screw 插件
- 文档生成
针对上边的操作步骤,通过下图进一步进行说明:
pom 文件中关于 screw 的相关配置信息,如下:
<build> <plugins> <!-- screws 生成数据库文档 --> <plugin> <groupId>cn.smallbun.screw</groupId> <artifactId>screw-maven-plugin</artifactId> <version>1.0.5</version> <dependencies> <!-- 数据库连接 --> <dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> <version>3.4.5</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.22</version> </dependency> </dependencies> <configuration> <!-- 数据库相关配置 --> <driverClassName>com.mysql.cj.jdbc.Driver</driverClassName> <jdbcUrl>jdbc:mysql://rm-4zzwo723wt77015skzo.mysql.rds.aliyuncs.com/annoroad_staff_database</jdbcUrl> <username>root</username> <password>123456</password> <!-- screw 配置 --> <fileType>HTML</fileType> <title>数据库文档</title> <!--标题--> <fileName>测试文档名称</fileName> <!--文档名称 为空时:将采用[数据库名称-描述-版本号]作为文档名称--> <description>数据库文档生成</description> <!--描述--> <version>${project.version}</version> <!--版本--> <openOutputDir>false</openOutputDir> <!--打开文件输出目录--> <produceType>freemarker</produceType> <!--生成模板--> </configuration> <executions> <execution> <phase>compile</phase> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
原文:基于 screw maven 插件一键生成数据库文档https://blog.csdn.net/yangchao1125/article/details/120821591
这篇关于基于 screw maven 插件一键生成数据库文档的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-06有没有什么开源的py项目可以对图像进行分类-icode9专业技术文章分享
- 2024-07-05feign默认connecttimeout和readtimeout是多少-icode9专业技术文章分享
- 2024-07-05idea控制台,日志太多,导致部分想看得日志被刷走 搜不到-icode9专业技术文章分享
- 2024-07-05The server selected protocol version Tls10 is not accepted by client preferences [TLs12]-icode9专业技术文章分享
- 2024-07-05怎么清理项目缓存-icode9专业技术文章分享
- 2024-07-04安装 Eyoucms详细图文教程-icode9专业技术文章分享
- 2024-07-04ueditor 复制文章时,图片的链接是一个下载图片地址,该如何处理?-icode9专业技术文章分享
- 2024-07-04怎样判断host有没有对wordpress有缓存呢-icode9专业技术文章分享
- 2024-07-04具有编译功能的系统make后,无法ssh连接-icode9专业技术文章分享
- 2024-07-04make后如何升级ssh-icode9专业技术文章分享