美文网首页
SpringBoot 如何打包 war 部署文件?

SpringBoot 如何打包 war 部署文件?

作者: 8e744d4a988c | 来源:发表于2018-06-14 20:27 被阅读37次

1、修改 pom.xml 中:

<packaging>jar</packaging>

部分为:

<packaging>war</packaging>

2、在 pom.xml 中 <dependencies> 节点下加入:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

然后执行 package 打包即可。

相关文章

网友评论

      本文标题:SpringBoot 如何打包 war 部署文件?

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