第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

mvn jetty:run的目的是什么

訪問(wèn)的時(shí)候直接在地址欄輸入訪問(wèn)的網(wǎng)址就可以了,為什么每次都要先執(zhí)行mvn jetty:run命令呢?


正在回答

2 回答

???,不啟動(dòng)項(xiàng)目你怎么輸入網(wǎng)站

0 回復(fù) 有任何疑惑可以回復(fù)我~

mvn:一種代碼管理工具,也負(fù)責(zé)依賴包的管理。比如你可以加入jetty的maven插件像這樣:

<plugins>

? ? ? ? <plugin>

? ? ? ? ? <groupId>org.eclipse.jetty</groupId>

? ? ? ? ? <artifactId>jetty-maven-plugin</artifactId>

? ? ? ? ? <version>9.4.8.v20171121</version>

? ? ? ? </plugin>

? ? ? </plugins>


jetty:servlet容器。也可以認(rèn)為是運(yùn)行環(huán)境。Javaweb程序的根基是servlet(jsp也是特殊的servlet,框架的根基也是。),頁(yè)面的呈現(xiàn)啊、頁(yè)面的跳轉(zhuǎn)啊所有網(wǎng)頁(yè)的相關(guān)功能都是由servlet來(lái)處理。Javase部分并不負(fù)責(zé)servlet運(yùn)行相關(guān)的條件,需要外部容器,這個(gè)容器可以是各種各樣的,例如jetty、tomcat。這里的容器也可以看成你工程的“服務(wù)器”了。Linux部署完成這些容器后,打包發(fā)布工程,本地點(diǎn)擊瀏覽器就能看見(jiàn)你的網(wǎng)頁(yè)了。


mvn jetty:run:則是要求工程運(yùn)行到j(luò)etty的命令,意思是:“工程??!你在jetty里面奔跑起來(lái)吧!”,官網(wǎng)對(duì)它的描述是:

The plugin automatically ensures the classes are rebuilt and up-to-date before deployment. If you change the source of a class and your IDE automatically compiles it in the background, the plugin picks up the changed class.

You do not need to assemble the webapp into a WAR, saving time during the development cycle. Once invoked, you can configure the plugin to run continuously, scanning for changes in the project and automatically performing a hot redeploy when necessary. Any changes you make are immediately reflected in the running instance of Jetty, letting you quickly jump from coding to testing, rather than going through the cycle of: code, compile, reassemble, redeploy, test.

這里面提到了只要運(yùn)行起來(lái),每次修改完成代碼后,其實(shí)也不需要重新啟動(dòng)了。

以上是我的理解。


2 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

mvn jetty:run的目的是什么

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)