org.apache.ibatis.exceptions.PersistenceException异常

img

在mybatis框架中遇到了org.apache.ibatis.exceptions.PersistenceException异常
不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 这篇文章讲的很详细,请看:org.apache.ibatis.exceptions.PersistenceException解决方案
  • 除此之外, 这篇博客: Caused by org.apache.ibatis.exceptions.PersistenceException:中的 我自己去 网上查的时候发现大家出现【Caused by: org.apache.ibatis.exceptions.PersistenceException:】错误的时候,大多是自己的Mapper配置文件除了问题,所以去仔细检查自己的Mapper.xml吧! 部分也许能够解决你的问题, 你可以仔细阅读以下内容或者直接跳转源博客中阅读:

    我在添加log4j日志时,也出现了【Caused by: org.apache.ibatis.exceptions.PersistenceException:】但是我多次检查自己的Mapper配置文件,发现并没有错误,然后我又去看了错误提示,在【Caused by: org.apache.ibatis.exceptions.PersistenceException:】下又发现了【Cause: java.lang.NoClassDefFoundError: org/apache/log4j/Priority】–意思没有引入log4j的JAR包,我去检查后发现我确实没有引入成功,刷新Maven成功引入log4j的JAR包后,这个错误就没有了。


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^

找不到mapper文件?参考下这个 https://blog.csdn.net/weixin_44347833/article/details/121941004