spring+mybatis+log4j2打印SQL到日志问题

checkandbalance 2016-05-06 04:43:57
按照官方文档设置
mybatis_config.xml:
<settings>
<setting name="logImpl" value="LOG4J2"/>
</settings>
但是启动程序报错
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.logging.LogException: Error setting Log implementation. Cause: java.lang.reflect.InvocationTargetException

使用JAR包
slf4j-log4j12-1.6.3.jar
log4j-api-2.3.jar
log4j-core-2.3.jar
mybatis-3.2.6.jar
mybatis-spring-1.2.2.jar

一个星期了,求大神啊
...全文
1057 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
戴墨镜的虫子 2016-05-09
  • 打赏
  • 举报
回复
Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.logging.LogException: Error setting Log implementation. Cause: java.lang.reflect.InvocationTargetException

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧