org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
大概意思就是mapper.xml文件中没找到与mapper接口方法一致的实现。
已配置信息:
application.properties
#mybatis mybatis.mapper-locations=classpath:mybatis/mapper/*.xml mybatis.type-aliases-package=com.xx.dao.mapper mybatis.configuration.map-underscore-to-camel-case=true
java 配置
import org.mybatis.spring.annotation.MapperScan; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableTransactionManagement @MapperScan(value = {"com.xx.dao.mapper"}) public class MybatisConfig { }
同时文件放于
resources/mybatis/mapper
修改mybatis文件夹名称,暂时不知道为啥,mybatis文件夹下面的不认。
https://www.leftso.com/article/790.html