springboot 打包时把第三方依赖jar包一起打包

在 pom.xml 配置打包插件

<build>
        <defaultGoal>compile</defaultGoal>
        <plugins>
            <!--war 打包插件-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!--jar 打包插件-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.yo.project.Application</mainClass>
                    <includeSystemScope>true</includeSystemScope>
                </configuration>
            </plugin>
        </plugins>
    </build>

你可能感兴趣的:(笔记,spring,boot,jar,java)