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>

 

posted @ 2019-09-16 20:17  一沙世界  阅读(1711)  评论(0编辑  收藏  举报