美文网首页
Springboot 打包jar包到指定文件夹并重命名

Springboot 打包jar包到指定文件夹并重命名

作者: 原始人y | 来源:发表于2021-01-05 11:01 被阅读0次

1、pom文件配置如下

<properties>
        <java.version>1.8</java.version>
        <spring-cloud.version>Hoxton.SR10</spring-cloud.version>
        <target>../target</target>
 </properties>
<dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <!--配置为执行-->
                    <classifier>exec</classifier>
                    <outputDirectory>${target}</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
        <finalName>fileserver</finalName>
    </build>


</project>

关键的就是要打包的微服务pom文件添加 框内的内容


image.png

相关文章

网友评论

      本文标题:Springboot 打包jar包到指定文件夹并重命名

      本文链接:https://www.haomeiwen.com/subject/pvuioktx.html