错误原因:
dao层(又叫mapper接口)跟mapper.xml文件没有映射
解决方法
(1)打开spring-context.xml配置文件
(2)找到class为org.mybatis.spring.SqlSessionFactoryBean 这个bean
(3)找到name为mapperLocations的property
(4)在list标签中添加一个value
例如:
<value>classpath:/info/mappings/**/*.xml</value>
重启,问题解决!!!
或者.yml配置i文件
mybatis-plus: mapperLocations: classpath:/mapper/**/*.xml
注意你的路径 也有可能是/mapper/*.xml