1、检查项目配置在application.properties中添加
mybatis.mapper-locations=classpath:mapper/*.xml
此处配置指向src/main/resources/mapper 。
如果使用yaml或者对于mybatis有单独的配置文件的话,按相应的格式要求声明。
2、检查xml文件中的namespace
<mapper namespace="com.wisdom.visitor.dao.OAUserMapper">
这里需要你mapper接口的全路径
3、检查xml中的方法名与mapper的方法名是否一致
<select id="getByInfo" resultType="com.wisdom.visitor.entity.OAUserEntity">