![【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot_第1頁](http://file4.renrendoc.com/view/73ecb841c8fa85d02e6bebe2050be76e/73ecb841c8fa85d02e6bebe2050be76e1.gif)
![【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot_第2頁](http://file4.renrendoc.com/view/73ecb841c8fa85d02e6bebe2050be76e/73ecb841c8fa85d02e6bebe2050be76e2.gif)
![【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot_第3頁](http://file4.renrendoc.com/view/73ecb841c8fa85d02e6bebe2050be76e/73ecb841c8fa85d02e6bebe2050be76e3.gif)
![【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot_第4頁](http://file4.renrendoc.com/view/73ecb841c8fa85d02e6bebe2050be76e/73ecb841c8fa85d02e6bebe2050be76e4.gif)
![【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot_第5頁](http://file4.renrendoc.com/view/73ecb841c8fa85d02e6bebe2050be76e/73ecb841c8fa85d02e6bebe2050be76e5.gif)
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
【移動(dòng)應(yīng)用開發(fā)技術(shù)】idea怎么使用外置tomcat配置springboot
本篇內(nèi)容介紹了“idea怎么使用外置tomcat配置springboot”的有關(guān)知識(shí),在實(shí)際案例的操作過程中,不少人都會(huì)遇到這樣的困境,接下來就讓在下帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
創(chuàng)建一個(gè)maven項(xiàng)目導(dǎo)入springboot依賴,注意底下注釋部分<?xml
version="1.0"
encoding="UTF-8"?>
<project
xmlns="/POM/4.0.0"
xmlns:xsi="/2001/XMLSchema-instance"
xsi:schemaLocation="/POM/4.0.0
/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.znsd.springboot</groupId>
<artifactId>springboot-jsp</artifactId>
<version>1.0-SNAPSHOT</version>
<!--
一定要聲明war包
-->
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
<relativePath/>
<!--
lookup
parent
from
repository
-->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--
去除springboot默認(rèn)tomcat依賴,讓其在生成war包時(shí)無效,
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<!--在編譯和測(cè)試有效,生成war包時(shí)無效-->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>完成下圖操作保存即可配置tomcat啟動(dòng)項(xiàng)配置視圖解析器創(chuàng)建一個(gè)springboot主程序@SpringBootApplication
public
class
SpringBootMain
{
public
static
void
main(String[]
args)
{
SpringApplication.run(SpringBootMain.class,args);
}
}必須編寫一個(gè)SpringBootServletInitializer的子類,并調(diào)用configure方法里面的固定寫法public
class
ServletInitializer
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure(SpringApplicationBuilder
applicatio
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年罩極型電動(dòng)機(jī)項(xiàng)目可行性研究報(bào)告
- 成都四川省人民醫(yī)院蒲江醫(yī)院·蒲江縣人民醫(yī)院編外護(hù)理人員招聘3人筆試歷年參考題庫附帶答案詳解
- 2025年熱彎爐項(xiàng)目可行性研究報(bào)告
- 2025年槳葉-微粉兩級(jí)干燥系統(tǒng)項(xiàng)目可行性研究報(bào)告
- 2025年旋轉(zhuǎn)式膜電位器項(xiàng)目可行性研究報(bào)告
- 2025年差動(dòng)軸項(xiàng)目可行性研究報(bào)告
- 2025年噴氣織機(jī)邊撐項(xiàng)目可行性研究報(bào)告
- 2025年利巴韋林滴眼液項(xiàng)目可行性研究報(bào)告
- 2025至2031年中國3-丙二醇行業(yè)投資前景及策略咨詢研究報(bào)告
- 2025至2030年高純錳礦項(xiàng)目投資價(jià)值分析報(bào)告
- 初中體育與健康 初一上期 水平四(七年級(jí))田徑大單元教學(xué)設(shè)計(jì)+蹲踞式跳遠(yuǎn)教案
- 三化一穩(wěn)定嚴(yán)進(jìn)嚴(yán)出專案報(bào)告
- 2024過敏性休克搶救要點(diǎn)(附圖表)
- 翻譯批評(píng)與賞析課件
- 廣西2024年高考物理模擬試卷及答案1
- 2024年廣東省中考?xì)v史真題(含解析)
- 垃圾填埋場(chǎng)項(xiàng)目經(jīng)濟(jì)效益和社會(huì)效益分析
- JGJ52-2006 普通混凝土用砂、石質(zhì)量及檢驗(yàn)方法標(biāo)準(zhǔn)
- 組織生活個(gè)人發(fā)言稿
- (高清版)JTST 273-2024 水運(yùn)工程測(cè)量定額
- 電網(wǎng)工程勞務(wù)分包投標(biāo)技術(shù)方案(技術(shù)標(biāo))
評(píng)論
0/150
提交評(píng)論