spring boot IDEA项目打包 war 包,并部署至tomcat

  1. 1 配置文件嵌入tomcat插件
  2.         <!-- 移除嵌入式tomcat插件 -->
        <exclusions>
            <exclusion>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
        </exclusions>
    

spring boot IDEA项目打包 war 包,并部署至tomcat
3. 配置IDEA 生成war方式
spring boot IDEA项目打包 war 包,并部署至tomcat
4. 构建项目,生成war包
spring boot IDEA项目打包 war 包,并部署至tomcat
spring boot IDEA项目打包 war 包,并部署至tomcat
spring boot IDEA项目打包 war 包,并部署至tomcat
spring boot IDEA项目打包 war 包,并部署至tomcat
5. 查看war包,并部署到tomcat
找到war,修改名称备用。spring boot IDEA项目打包 war 包,并部署至tomcat

spring boot IDEA项目打包 war 包,并部署至tomcat
在tomcat 页面,找到 war file to deploy,点击选择文件,选择刚生成的war包,点击Deploy

  1. 文件上传失败,修改配置

spring boot IDEA项目打包 war 包,并部署至tomcat
修改配置文件
spring boot IDEA项目打包 war 包,并部署至tomcat
在http{} 里面添加 client_max_body_size 50M;

修改后,成功部署项目。