使用idea对spring boot项目打jar和war包[文件]

pom.xml文件编写

打JAR包时

    <groupId>com.netcorner</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>demo</description>
    <packaging>jar</packaging>

 打WAR包时

  <groupId>com.netcorner</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>demo</description>
    <packaging>war</packaging>

然后IDEA中找到install并双击运行

编译成功后

 

posted @ 2019-03-03 10:07  netcorner  阅读(391)  评论(0编辑  收藏  举报