Wrong namespace. Expected 'com.pan.mapper.StoreMapper' but found 'com.pan.mapper.UserMapper'
6.Wrong namespace. Expected 'com.pan.mapper.StoreMapper' but found 'com.pan.mapper.UserMapper'
问题详情:
org.apache.ibatis.builder.BuilderException: Wrong namespace. Expected 'com.pan.mapper.StoreMapper' but found 'com.pan.mapper.UserMapper'.
原因:
StoreMapper接口对应的StoreMapper.xml的<mapper>根标签的namespace属性配置有误
比如我这里,就是把此属性写成了<mapper namespace="com.pan.mapper.UserMapper">(因为我是直接把UserMapper.xml复制过来的,忘记改这个属性了)。
解决:
namespace的属性值应该是*Mapper.xml文件对应的那个接口的位置,不要写错了。
我这里只需要把StoreMapper.xml文件的<mapper namespace="com.pan.mapper.UserMapper">改为<mapper namespace="com.pan.mapper.StoreMapper">即可

浙公网安备 33010602011771号