国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept

這篇具有很好參考價(jià)值的文章主要介紹了Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

SpringBoot項(xiàng)目啟動(dòng)報(bào)錯(cuò),如圖
Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept,java,spring boot
Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.這個(gè)錯(cuò)誤

可以看出ServletWebServerFactory在sping容器啟動(dòng)時(shí)沒(méi)有將其注冊(cè)進(jìn)去,缺少相關(guān)依賴(lài)。沒(méi)有對(duì)應(yīng)的servelt容器,工程當(dāng)然也就啟動(dòng)不起來(lái)。這里多講一下,springboot工程會(huì)通過(guò)@EnableAutoConfiguration這個(gè)注解去拉去默認(rèn)配置,該注解通過(guò)@Import注解導(dǎo)入了AutoConfigurationImportSelector類(lèi)。其實(shí)這個(gè)類(lèi),就是導(dǎo)入通過(guò)加載配置文件,加載了很多工廠方法的配置類(lèi)。最終會(huì)加載 META-INF/spring.factories這些文件,通過(guò)這些文件完成自動(dòng)裝配。@Import注解加載了tomcat,jetty,undertow三個(gè)web服務(wù)器的配置類(lèi)。由于沒(méi)有導(dǎo)入jetty和undertow的相關(guān)jar包,這兩個(gè)類(lèi)實(shí)例的不會(huì)真正的加載。到這里分析,為什么會(huì)缺少相應(yīng)的servlet容器?springboot不默認(rèn)加載了tomcat容器嗎,因?yàn)閠omcat的相關(guān)jar包已經(jīng)在spring-boot-starter-web中引入了,按照之前我們的分析,實(shí)際上被加載的容器應(yīng)該是tomcat,為什么還會(huì)找不到呢?

所以在項(xiàng)目里找spring-boot-starter-tomcat這個(gè)依賴(lài),發(fā)現(xiàn)沒(méi)有。。。。。
竟然沒(méi)有!

手動(dòng)添加

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-tomcat</artifactId>
		<version>2.1.5.RELEASE</version>
	</dependency>

重新運(yùn)行,可以了

當(dāng)然還有各種其他問(wèn)題也會(huì)導(dǎo)致沒(méi)有注冊(cè)到容器中,得自己一一排查文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-629709.html

到了這里,關(guān)于Unable to start web server; nested exception is org.springframework.context.ApplicationContextExcept的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 已解決 nested exception is org.springframework.boot.web.server.WebServerExcepti

    已解決 nested exception is org.springframework.boot.web.server.WebServerExcepti nested exception is org.springframework.boot.web.server.WebServerExcepti 這個(gè)錯(cuò)誤是由于Spring Boot應(yīng)用程序啟動(dòng)時(shí)發(fā)生的Web服務(wù)器異常所引起的。 下滑查看解決方法 通常,這種異常是由于配置錯(cuò)誤或依賴(lài)項(xiàng)問(wèn)題導(dǎo)致的。 下面是一

    2024年01月23日
    瀏覽(20)
  • 【Springboot整合Redis已解決】 Unable to connect to Redis; nested exception is org.springframework.data.redi

    介紹 這里是小編成長(zhǎng)之路的歷程,也是小編的學(xué)習(xí)之路。希望和各位大佬們一起成長(zhǎng)! 以下為小編最喜歡的兩句話(huà): 要有最樸素的生活和最遙遠(yuǎn)的夢(mèng)想,即使明天天寒地凍,山高水遠(yuǎn),路遠(yuǎn)馬亡。 一個(gè)人為什么要努力? 我見(jiàn)過(guò)最好的答案就是:因?yàn)槲蚁矚g的東西都很貴,

    2024年02月15日
    瀏覽(21)
  • SpringBoot啟動(dòng)報(bào)錯(cuò)Unable to start web server; nested exception...

    SpringBoot啟動(dòng)報(bào)錯(cuò)Unable to start web server; nested exception...

    在創(chuàng)建SpringBoot項(xiàng)目時(shí),依賴(lài)加載,但是啟動(dòng)報(bào)錯(cuò)如下:Unable to start web server; nested exception… 網(wǎng)上找了很多,很多回答為版本不一致,但仔細(xì)檢查,版本對(duì)應(yīng)都修改好了,但是還是報(bào)這個(gè)錯(cuò)誤,test卻能夠成功。 根據(jù)自測(cè),是導(dǎo)入的依賴(lài)問(wèn)題:注釋掉或者刪除即可 原因是在創(chuàng)建

    2024年02月12日
    瀏覽(20)
  • org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server

    org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server

    org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server ------------------------------------------ 本地模擬復(fù)現(xiàn)問(wèn)題 JDK 1.8_341? ?tomcat 9.0.41 其實(shí)不是tomcat和JDK版本問(wèn)題,而是SSL配置出錯(cuò)的。

    2024年04月12日
    瀏覽(23)
  • 程序啟動(dòng)報(bào)錯(cuò)org.springframework.context.ApplicationContextException: Unable to start web server

    1、該項(xiàng)目在Linux和本機(jī)電腦上啟動(dòng)都正常 2、在另一臺(tái)電腦上啟動(dòng)就報(bào)錯(cuò) 3、代碼都是同一份,沒(méi)有差別 導(dǎo)入spring-boot-starter-tomcat依賴(lài)時(shí)定義的scope導(dǎo)致 原依賴(lài)導(dǎo)入配置 調(diào)整后依賴(lài)導(dǎo)入配置 注:本機(jī)就算是provided也能正常啟動(dòng),另一臺(tái)電腦上就不行,應(yīng)該是運(yùn)行環(huán)境上的差異

    2024年02月15日
    瀏覽(21)
  • 2.2.1版本nacos報(bào)錯(cuò)org.springframework.context.ApplicationContextException: Unable to start web server; n

    2.2.1版本nacos報(bào)錯(cuò)org.springframework.context.ApplicationContextException: Unable to start web server; n

    ? 報(bào)錯(cuò)信息: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat Caused by: java.lang.IllegalArgumentException: the length of secret key must great than or equal 32 bytes; And the secret key ?must be encoded by b

    2024年02月03日
    瀏覽(22)
  • 錯(cuò)誤:org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is

    錯(cuò)誤:org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.setContentLengthLong(J)V 這里很多用的是Tomcat7和servlet4,1.0,webmvc用的比較高的版本會(huì)導(dǎo)致的問(wèn)題 type Exception report message Handler dispatch failed; nested exc

    2024年02月11日
    瀏覽(23)
  • SpringBoot項(xiàng)目啟動(dòng)報(bào)錯(cuò):Injection of resource dependencies failed; nested exception is org.springframework

    bean注入失敗,報(bào)錯(cuò)如下: 檢查最后一行報(bào)錯(cuò)的XXXService,里面注入的service類(lèi), 是否互相注入 檢查注入的對(duì)象名是否為類(lèi)名一致(首字母小寫(xiě)) 只使用@Autowired時(shí),需要保證注解的對(duì)象名和注解類(lèi)名一致, 注意: 首字母要小寫(xiě),且注解時(shí)沒(méi)有命名 解決: 方法1:優(yōu)化代碼,去掉互

    2024年04月16日
    瀏覽(57)
  • Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExcep

    Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExcep

    ? ? 上網(wǎng)查的方法不外乎幾種 maven按順序讀取的,~~eureka-client的 依賴(lài)放太下面 springboot和cloud版本不對(duì)應(yīng) 引入依賴(lài)沒(méi)有指定版本 沒(méi)在啟動(dòng)類(lèi)加入注解 spring boot和cloud版本不對(duì)應(yīng) 因?yàn)閑ureka服務(wù)都搭建成功,怎么可能在注冊(cè)服務(wù)這階段的時(shí)候還是springboot和cloud版本不對(duì)應(yīng) 沒(méi)有指

    2024年02月07日
    瀏覽(55)
  • 解決“Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullPoint”

    當(dāng)你的spring-boot版本是2.6.x并且你的swagger版本是3.0.0以上的時(shí)候,項(xiàng)目啟動(dòng)會(huì)報(bào)錯(cuò)“org.springframework.context.ApplicationContextException: Failed to start bean \\\'documentationPluginsBootstrapper\\\'; nested exception is java.lang.NullPointerException” 解決辦法 步驟一、 添加配置 步驟二、 添加配置類(lèi)

    2024年02月16日
    瀏覽(20)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包