mirror of
https://gitee.com/yudaocode/SpringBoot-Labs.git
synced 2026-09-03 05:53:54 +08:00
使用 screw 生成接口文档
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
|
||||
<artifactId>lab-70-db-doc-screw-01</artifactId>
|
||||
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!-- screw 库,简洁好用的数据库表结构文档生成器 -->
|
||||
<dependency>
|
||||
|
||||
@@ -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 = "文档描述";
|
||||
|
||||
60
lab-70-db-doc/lab-70-db-doc-screw-02/pom.xml
Normal file
60
lab-70-db-doc/lab-70-db-doc-screw-02/pom.xml
Normal file
@@ -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>
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
<modules>
|
||||
<module>lab-70-db-doc-screw-01</module>
|
||||
<module>lab-70-db-doc-screw-02</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user