我遇到了iBatis的这个绑定问题。这是我的项目的结构:我想在Device.xml映射DeviceDaoiBatis与Maven的映射器绑定异常
。这是我在Device.xml中做到的。
<mapper namespace="service.dao.DeviceDao">
但是,当我尝试访问它时,会引发此错误。
"errorMessage": "Type interface service.dao.DeviceDao is not known to the MapperRegistry.","errorType": "org.apache.ibatis.binding.BindingException"
我试着将它改为smartcontrol.service.dao.DeviceDao,但仍然没有工作。
我不明白的是,为什么Device 对象的引用位置没有引起任何问题?
,我谈到Configurations.xml被引用
<typeAliases>
<typeAlias alias="Device" type="server.pojo.Device"/>
</typeAliases>
设备位于下server.pojo
你看,他们service.dao.DeviceDao的设备对象和server.pojo.Device都位于samples/src/main/java/smartcontrol下。那么,为什么在引用service.dao.DeviceDao时存在问题,而server.pojo.Device没有问题?