什么都不需要配置,跟着做!

pom.xml修改打包类型为war

<packaging>war</packaging>

排除内置Tomcat

        <!--因配置外部TOMCAT 而配置-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>

打包过程跳过测试

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

然后直接点击IDEA 右边的MAVEN面板,双击package.

SpringBoot idea maven打包war

 

相关文章:

  • 2021-04-15
  • 2022-12-23
  • 2021-08-27
  • 2021-06-09
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-16
  • 2022-12-23
  • 2022-03-05
  • 2021-12-05
  • 2021-07-24
  • 2021-07-07
相关资源
相似解决方案