IDEA启动tomcat 报Context initialization failed记录

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [mybatis-config.xml]; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: The setting log4jImpl is not known. Make sure you spelled it correctly (case sensitive).

idea报错Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [applicationContext.xml]:
逐步检查:

spring 容器文件
IDEA启动tomcat 报Context initialization failed记录_第1张图片
对每行进行注释发现
只有出现这两行代码才会报错,且dataSource排查过无错IDEA启动tomcat 报Context initialization failed记录_第2张图片
所以问题出现在这段代码:


语法没问题,遂检查mybatis-config.xml
IDEA启动tomcat 报Context initialization failed记录_第3张图片
各种抠字眼最后发现
setting name=“log4jImpl” value=“LOG4J”

官方给的文档是IDEA启动tomcat 报Context initialization failed记录_第4张图片
改成在这里插入图片描述
问题解决。。。。

起初以为配置log4j的这个name是随意的,idea也没提示logImpl就没在意,但是没想到竟然会报错,logImpl原来是固定的字段。记录一下

你可能感兴趣的:(IDEA启动tomcat 报Context initialization failed记录)