<build>
        <finalName>springboot_01</finalName>
        <plugins>
            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.7</version>
                <configuration>
                    <configurationFile>src\main\resources\generatorConfig.xml</configurationFile>
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
                </configuration>
                <executions>
                    <execution>
                        <id>GenerateMyBatis Artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.mybatis.generator</groupId>
                        <artifactId>mybatis-generator-core</artifactId>
                        <version>1.3.7</version>
                    </dependency>
                </dependencies>
            </plugin>

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

        <!-- 添加资源 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <!-- src/main/resources下的指定资源放行 -->
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.yml</include>
                    <include>**/*.xml</include>
                    <include>**/*.html</include>
                    <include>**/*.css</include>
                    <include>**/*.jpg</include>
                    <include>**/*.png</include>
                    <include>**/*.js</include>
                    <include>**/*.woff2</include>
                    <include>**/*.woff</include>
                    <include>**/*.ttf</include>
                    <include>**/*.jpeg</include>
                </includes>
                <filtering>false</filtering>
            </resource>

            <!--<resource>-->
                <!--<directory>src/main/resources</directory>-->
                <!--<filtering>true</filtering>-->
            <!--</resource>-->
        </resources>
    </build>

添加了
<phase>deploy</phase>


<execution>
                       <id>GenerateMyBatis Artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>

刘荣轩
338 声望6 粉丝

须知少日拿云志,曾许人间第一流。