1、在项目中加入log4j.properties后,记得要在xml文件中加载该配置文件
①log4j.properties应该放在classpath下:
②加载配置文件:applicationContext-dao.xml中