Skip to content

Commit

Permalink
使用 screw 生成接口文档
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Dec 12, 2020
1 parent 7ceb293 commit ab27b89
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
2 changes: 0 additions & 2 deletions lab-70-db-doc/lab-70-db-doc-screw-01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

<artifactId>lab-70-db-doc-screw-01</artifactId>



<dependencies>
<!-- screw 库,简洁好用的数据库表结构文档生成器 -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ScrewMain {
private static final String DB_PASSWORD = "3WLiVUBEwTbvAfsh";

private static final String FILE_OUTPUT_DIR = "/Users/yunai/screw_test";
private static final EngineFileType FILE_OUTPUT_TYPE = EngineFileType.HTML; // 可以设置 WORD 或者 Markdown 格式
private static final EngineFileType FILE_OUTPUT_TYPE = EngineFileType.HTML; // 可以设置 Word 或者 Markdown 格式
private static final String DOC_FILE_NAME = "数据库文档";
private static final String DOC_VERSION = "1.0.0";
private static final String DOC_DESCRIPTION = "文档描述";
Expand Down
60 changes: 60 additions & 0 deletions lab-70-db-doc/lab-70-db-doc-screw-02/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>lab-70-db-doc</artifactId>
<groupId>cn.iocoder.springboot.labs</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>lab-70-db-doc-screw-02</artifactId>

<build>
<plugins>
<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://400-infra.server.iocoder.cn:3306/mall_system</jdbcUrl>
<username>root</username>
<password>3WLiVUBEwTbvAfsh</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>

</project>
1 change: 1 addition & 0 deletions lab-70-db-doc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<modules>
<module>lab-70-db-doc-screw-01</module>
<module>lab-70-db-doc-screw-02</module>
</modules>

</project>

0 comments on commit ab27b89

Please sign in to comment.