《Springboot極簡教程》問題解決:org.apache.catalina.LifecycleException: A child container failed during start

錯誤日志

org.apache.catalina.LifecycleException: A child container failed during start

原因分析

項目依賴?yán)锩鎲为?dú)指定了servlet-api,類路徑里面有多個版本servlet-api,導(dǎo)致類沖突

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>${servlet-api-version}</version>
    <scope>provided</scope>
</dependency>

解決方案

在Springboot中,不要單獨(dú)指定下面幾個依賴的版本,默認(rèn)使用Springboot的配置完的依賴即可:


   providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
    compile('javax.servlet:jstl')
    providedCompile('org.apache.tomcat.embed:tomcat-embed-jasper')

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 134,948評論 18 139
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 46,958評論 6 342
  • 從三月份找實習(xí)到現(xiàn)在,面了一些公司,掛了不少,但最終還是拿到小米、百度、阿里、京東、新浪、CVTE、樂視家的研發(fā)崗...
    時芥藍(lán)閱讀 42,367評論 11 349
  • Spring Web MVC Spring Web MVC 是包含在 Spring 框架中的 Web 框架,建立于...
    Hsinwong閱讀 22,568評論 1 92
  • 數(shù)學(xué)對象http://www.w3school.com.cn/jsref/jsref_obj_math.asp字符...
    云淡風(fēng)輕_301b閱讀 227評論 0 0