久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    spring boot啟動(dòng)報(bào)Unable to start EmbeddedWebApplicationContext問題解決方案

     WindySky 2017-10-25 發(fā)布于廣東

    異常全文如下:

    1. org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.  
    2.     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    3.     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536) ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]  
    4.     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    5.     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    6.     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    7.     at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    8.     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1187) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    9.     at org.springframework.boot.SpringApplication.run(SpringApplication.java:1176) [spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    10.     at com.travelsky.srd.tcldp.SrdTcldpApplication.main(SrdTcldpApplication.java:10) [classes/:na]  
    11. Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.  
    12.     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:189) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    13.     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:162) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    14.     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.4.4.RELEASE.jar:1.4.4.RELEASE]  
    15.     ... 8 common frames omitted  
    大概意思就是不能啟動(dòng)containerFactory,初始化容器失敗。

    異常原因剖析:

    經(jīng)過(guò)一系列的debug,發(fā)現(xiàn)是由于使用的CXF多引了一個(gè)包導(dǎo)致的,該包如下:

    1. <!-- Jetty is needed if you're are not using the CXFServlet -->  
    2.         <dependency>  
    3.             <groupId>org.apache.cxf</groupId>  
    4.             <artifactId>cxf-rt-transports-http-jetty</artifactId>  
    5.             <version>${cxf.version}</version>  
    6.         </dependency>  
    引入這個(gè)包后,當(dāng)spring boot啟動(dòng)的時(shí)候,發(fā)現(xiàn)classpath下存在Jetty的jar包,于是推測(cè)我們要使用的容器不是默認(rèn)的tomcat而是jetty,于是使用jetty容器,但是在初始化jetty容器的時(shí)候,卻由于在spring boot中沒有加入jetty starter導(dǎo)致一些jetty容器依賴的某些jar包環(huán)境又不存在,最終導(dǎo)致初始化容器失敗。

    異常解決方法:

    1、刪除導(dǎo)致spring boot可能認(rèn)為不使用默認(rèn)容器的jar包,上例中可以刪除依賴的jetty的jar包

    2、在spring boot中加入spring-boot-starter-jetty,明確我們想使用什么容器,不要讓spring boot引起誤會(huì)和錯(cuò)誤的可能猜測(cè)

    通過(guò)上面的幾個(gè)步驟,異常問題解決了,spring boot可以正常啟動(dòng)!

      本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
      轉(zhuǎn)藏 分享 獻(xiàn)花(0

      0條評(píng)論

      發(fā)表

      請(qǐng)遵守用戶 評(píng)論公約

      類似文章 更多

      主站蜘蛛池模板: 国产精品一区二区中文| 精品熟女少妇AV免费观看 | 成人网站WWW污污污网站| 无码日韩精品一区二区三区免费| 性欧美VIDEOFREE高清大喷水 | 久久先锋男人AV资源网站| 成人无码影片精品久久久| 亚洲国产精品一区二区第一页| 夜鲁夜鲁很鲁在线视频 视频| 日韩亚洲AV人人夜夜澡人人爽 | AV极品无码专区亚洲AV| 久久97精品久久久久久久不卡| 中国熟妇毛多多裸交视频| 久久国产成人午夜AV影院| 亚洲精品成人福利网站| 欧美激情一区二区久久久| 华人在线亚洲欧美精品| 国产乱码卡二卡三卡4| 麻豆国产AV剧情偷闻女邻居内裤| 美女内射毛片在线看免费人动物| 午夜福利片1000无码免费| 久久久久亚洲AV成人网人人软件| 亚洲色大成网站WWW永久麻豆| 天码AV无码一区二区三区四区| 午夜男女爽爽影院在线| 欧美成人免费全部| 亚洲AV旡码高清在线观看| 人妻一区二区三区三区| 午夜亚洲乱码伦小说区69堂| 亚洲高清WWW色好看美女| 2021亚洲国产精品无码| 最近2019中文字幕大全视频1| 久久天天躁狠狠躁夜夜2020老熟妇| 桃子视频在线播放WWW| 久久影院午夜伦手机不四虎卡| 麻豆国产传媒精品视频| 色噜噜综合亚洲AV中文无码| 无码一区二区三区AV免费| 日本熟妇XXXX潮喷视频| 国产在线播放专区av| 久久精品99国产精品日本 |