新项目部署后启动报错:
严重: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [logConfig.xml] cannot be resolved to URL because it does not exist
到部署的tomcat文件夹中查看
编译后的文件中,WEB-INF的classes文件夹中确实是缺失了配置文件。因此,需要在编译前,将配置文件所在的resources目录添加为build path 右键package树上的resources文件夹,->build to path ->Add to… 然后重新部署编译即可。