项目中运行报错: Loading XML bean definitions from class path resource [applicationContext.xml]

  记录一下:java

org.springframework.context.support.AbstractApplicationContext prepareRefresh
Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7cef4e59: startup date [Fri Sep 30 09:33:28 CST 2016]; root of context hierarchy
org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
Loading XML bean definitions from class path resource [applicationContext.xml]

    Loading XML bean definitions from class path resource [applicationContext.xml] 今天小伙伴遇到了这个了问题。spring

    缘由是,在建立spring项目后,缺乏日志jar所致使的问题,因此只须要导入相应的日志jar便可。api

 

日志jar相关:app

  commons-logging:避免和具体的日志方案直接耦合,经过统一接口解耦。spa

  log4j:最典型日志解决方案。具体的日志系统 。经过 slf4j-log4j12初始化Log4j,达到最终日志的输出。日志

  slf4j(Simple Logging Facade for Java):为java提供的简单日志门面。slf4j入口是众多接口的集合,全部接口都定义在 slf4j-api 中code

                              (注:导入时不要同时出现多个实现slf4j的包出现,不然编译时 会报错xml

  slf4j-api:本质上 slf4j-api是个接口定义blog

  slf4j-log4j12:连接slf4j-api和log4j中间的适配器,实现了slf4j-apiz中StaticLoggerBinder接口,从而使得在编译时绑定的是slf4j-log4j12的 getSingleton()方法
接口

 

 

在Mybatis+spring项目中,习惯直接拷入这几个jar

 

         

 

 


                                          

记录点点滴滴,虽然微不足道。                  

相关文章
相关标签/搜索