啟動項目的時候報錯: Loading XML bean definitions from class path resource [applicationContext.xml]

來源:互聯網
上載者:User

標籤:

  記錄一下:

org.springframework.context.support.AbstractApplicationContext prepareRefreshRefreshing org[email protected]7cef4e59: startup date [Fri Sep 30 09:33:28 CST 2016]; root of context hierarchyorg.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitionsLoading XML bean definitions from class path resource [applicationContext.xml]

    Loading XML bean definitions from class path resource [applicationContext.xml] 今天小夥伴遇到了這個了問題。

    原因是,在建立spring項目後,缺少日誌jar所導致的問題,所以只需要匯入相應的日誌jar即可。

 

日誌jar相關:

  commons-logging:避免和具體的日誌方案直接耦合,通過統一介面解耦。

  log4j:最典型日誌解決方案。具體的日誌系統 。通過 slf4j-log4j12初始化Log4j,達到最終日誌的輸出。

  slf4j(Simple Logging Facade for Java):為java提供的簡單日誌門面。slf4j入口是眾多介面的集合,所有介面都定義在 slf4j-api 中

                              (註:匯入時不要同時出現多個實現slf4j的包出現,否則編譯時間 會報錯)

  slf4j-api:本質上 slf4j-api是個介面定義

  slf4j-log4j12:連結slf4j-api和log4j中間的適配器,實現了slf4j-apiz中StaticLoggerBinder介面,從而使得在編譯時間綁定的是slf4j-log4j12的 getSingleton()方法

 

 

在Mybatis+spring項目中,習慣直接拷入這幾個jar

 

         

 

 

 

記錄點點滴滴,雖然微不足道。                  

 

 

 

 

啟動項目的時候報錯: Loading XML bean definitions from class path resource [applicationContext.xml]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.