Springboot專案部署到外部Tomcat
這裡提供maven專案的解決方法:
1.將專案的啟動類Application.java繼承SpringBootServletInitializer並重寫configure方法
package com;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
2.在pom.xml檔案中,project下面將package標籤修改為war,沒有則增加war的package標籤
相關文章
- springboot 專案部署到外部tomcatSpring BootTomcat
- springboot專案部署到tomcat容器Spring BootTomcat
- 配置springboot專案使用外部tomcatSpring BootTomcat
- SpringBoot專案如何打包部署到tomcat中去Spring BootTomcat
- Springboot2專案配置(熱部署+war+外部tomcat+外部配置檔案)Spring Boot熱部署Tomcat
- Spring Boot專案部署到外部TomcatSpring BootTomcat
- 使用springboot建立web專案,並使用外部TomcatSpring BootWebTomcat
- springboot 整合外部tomcat war包部署方式Spring BootTomcat
- 多個springboot專案部署到tomcat,Error deploying web application archiveSpring BootTomcatErrorWebAPPHive
- 將springboot部署到tomcatSpring BootTomcat
- SpringBoot部署到外部Tomcat無法註冊到Nacos服務端Spring BootTomcat服務端
- SpringBoot使用外部tomcatSpring BootTomcat
- Jenkins部署Web專案到遠端tomcatJenkinsWebTomcat
- SpringBoot配置外部Tomcat專案啟動流程原始碼分析(長文)Spring BootTomcat原始碼
- Springboot整合外部Tomcat配置Spring BootTomcat
- SpringBoot中配置外部TomcatSpring BootTomcat
- SpringBoot 之配置外部TomcatSpring BootTomcat
- Centos8部署jdk、mysql8、tomcat,並部署專案到tomcat中CentOSJDKMySqlTomcat
- Tomcat部署web專案流程TomcatWeb
- SpringBoot配置外部Tomcat並支援JSPSpring BootTomcatJS
- 把spring-boot專案部署到tomcat中的方法SpringbootTomcat
- SpringBoot手動部署到Tomcat和自動化熱部署Spring BootTomcat熱部署
- SpringBoot專案在linux系統中的部署(直接部署、外接tomcat中部署)以及配置httpsSpring BootLinuxTomcatHTTP
- SpringBoot專案熱部署Spring Boot熱部署
- Docker部署SpringBoot專案DockerSpring Boot
- IDEA一鍵部署SpringBoot專案到伺服器IdeaSpring Boot伺服器
- SpringBoot配置外部Tomcat並打war包Spring BootTomcat
- SpringBoot專案部署到Linux端Tomcat伺服器上,並直接通過域名訪問應用Spring BootLinuxTomcat伺服器
- SpringBoot專案部署到阿里雲伺服器全流程Spring Boot阿里伺服器
- 如何將React專案,部署到Web伺服器的Tomcat 上ReactWeb伺服器Tomcat
- 將普通web專案(FWGL 服務管理)用idea 部署到tomcatWebIdeaTomcat
- SpringBoot 監控、專案部署Spring Boot
- SpringBoot 使用外部Tomcat方法及啟動原理Spring BootTomcat
- 如何打包部署一個tomcat專案Tomcat
- Tomcat 部署專案的三種方法Tomcat
- 專案部署到LinuxLinux
- Jenkins部署碼雲SpringBoot專案JenkinsSpring Boot
- 初學docker部署springboot專案DockerSpring Boot
- Docker(四)Docker部署SpringBoot專案DockerSpring Boot