当前位置:网站首页>Screen automatically generates database documents

Screen automatically generates database documents

2022-07-07 08:57:00 Please Sit Down

Maven plug-in

First step : pom.xml Add dependency

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>cn.smallbun.screw</groupId>
            <artifactId>screw-maven-plugin</artifactId>
            <version>1.0.3</version>
            <dependencies>
                <!-- HikariCP -->
                <dependency>
                    <groupId>com.zaxxer</groupId>
                    <artifactId>HikariCP</artifactId>
                    <version>3.4.5</version>
                </dependency>
                <!--mysql driver-->
                <dependency>
                    <groupId>mysql</groupId>
                    <artifactId>mysql-connector-java</artifactId>
                    <version>8.0.20</version>
                </dependency>
            </dependencies>
            <configuration>
                <!--username-->
                <username>root</username>
                <!--password-->
                <password>123456</password>
                <!--driver-->
                <driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>
                <!--jdbc url-->
                <jdbcUrl>jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC</jdbcUrl>
                <!-- Make file type : Three types of , Directly modifying  HTML MD WORD-->
                <fileType>WORD</fileType>
                <!-- Open the file output directory -->
                <openOutputDir>false</openOutputDir>
                <!-- Generate template -->
                <produceType>freemarker</produceType>
                <!-- describe -->
                <description> Database document generation </description>
                <!-- edition -->
                <version>${project.version}</version>
                <!-- title -->
                <title> Database documents </title>
            </configuration>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

The second step : perform maven engineering

image-20220211142741222

Generate one under the project directory doc file , Open to see the generated database document .

原网站

版权声明
本文为[Please Sit Down]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130629581564.html