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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

由于缺少 ServletWebServerFactory bean,無法啟動 ServletWeb

由于缺少 ServletWebServerFactory bean,無法啟動 ServletWeb

胡說叔叔 2023-09-27 16:10:05
使用 Jetty-starter,由于以下錯誤,我無法啟動 Spring Boot 應(yīng)用程序:20:23:51.548 [main] ERROR o.s.boot.SpringApplication - Application run failedorg.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:156) ~[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE]    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE]    ... 8 common frames omitted> Task :bootRun FAILED怎么解決這個問題呢?
查看完整描述

1 回答

?
隔江千里

TA貢獻1906條經(jīng)驗 獲得超10個贊

答案是 Spring jetty 啟動器無法按預(yù)期工作,您必須添加依賴項。


刪除啟動器,然后像這樣添加它們:https://medium.com/code-your-life/use-jetty9-with-spring-boot-and-gradle-85a1127c919f


dependencies{

  compile(“org.springframework.boot:spring-boot-starter-web”) {

    exclude module: “spring-boot-starter-tomcat”

  }

  compile ‘org.eclipse.jetty:jetty-webapp:9.+’

  compile ‘org.eclipse.jetty:jetty-jsp:9.+’

}


查看完整回答
反對 回復(fù) 2023-09-27
  • 1 回答
  • 0 關(guān)注
  • 85 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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