其他分享
首页 > 其他分享> > springboot 踩雷 invalid bound statement (not found): com.atguigu.springboot.mapper.employeemapper.gete

springboot 踩雷 invalid bound statement (not found): com.atguigu.springboot.mapper.employeemapper.gete

作者:互联网

排了两个小时的雷:配置文件的路径时正确的、调用方法名对应到xml文件的id也是正确的,头快秃的时候发现,为了配置又新建了application.yml文件,所有的配置操作都是在application.yml中进行的。

但是创建springboot工程的时候自动创建了application.properties文件,系统在application.properties自动添加了一些配置,其中就包括

  所以不管在application.yml中配置的mapper-location与它冲突了,导致系统无法找到对应的Mapper.xml文件。把application.properties中的内容注释掉,重新启动,问题解决!

标签:xml,mapper,springboot,文件,yml,application,employeemapper,properties
来源: https://www.cnblogs.com/wyhluckdog/p/13491848.html