因为将mapper.xml文件放在了java目录下,导致正常配置没法找到我的xml文件:
我的yml文件配置如下:
mybatis-plus:
mapper-locations: com/lingchao/mybatisplusdemo/mapper/*
报错如下:
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lingchao.mybatisplusdemo.dao.UserMapper.selectAll2
解决方案,在pom中加入一段配置: