spring boot项目maven打包可执行JAR

在pom.xml中添加如下配置:

       <!-- 打包可执行jar包 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <includeSystemScope>true</includeSystemScope>
                    <mainClass>com.sanro.test.CMApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

猜你喜欢

转载自www.cnblogs.com/yoyotl/p/11529644.html