有谁看一下这是什么问题吗?

img


做mybatis时,要封装工具类来测试功能,但一直显示报错,找不到问题在哪?
下面是报错地方写的
org.apache.ibatis.exceptions.PersistenceException:

Error building SqlSession.

The error may exist in SQL Mapper Configuration

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource jdbc.properties

核心配置文件

img

映射文件

img

测试

img

上面显示xml写的有问题,你看看你的xml内容哪里写错了

是你的核心配置文件中加载映射文件的路径写错了。
要不就是你在resources中建包是是用 . 号分开而不是用 \ 号。导致包创建错误找不到映射地址。

img

将mybatis-config.xml文件第26行代码中的/换成符号.试试

ParameterMapper.xml配置错误

img