Mybatis与MP的BUG集合

Mybatis与MP的BUG集合,第1张

Mybatis与MP的BUG集合 1. Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.

2021-12-27 10:49:12.274 ERROR 17968 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :
在测试当中,不能加@SpringbooTest注解

2. The error may exist in mybatis/mappers/UserMapper.xml Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource mybatis/mappers/UserMapper.xml


mybaits关联mapper映射文件异常
我的原因:Mybatis加载Mapper映射文件路径写错了

3. Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘mybatis/mybatis-config.xml’. Cause: java.lang.NullPointerException
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:123)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:95)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:378)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:120)
... 67 more

问题:空指针异常,也是映射的路径写错了

4.resultType错误


5.namespace 命名错误

检查namespace 命名空间

6.mybaits关联mapper映射文件异常

说明: 检查resource路径

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/5684403.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存