springboot中invalid bound statement

mybaites创建数据库连接的时候失败了,我的这个错误是创建项目时候,目录结构出现的问题:

使用idea创建项目:

application.preperties文件中配置mybatis:

springboot中invalid bound statement

当你使用idea在resources目录下创建com/hpm/piyin/mapper这样的目录的时候就会创建成com.hpm.piyin.mapper为目录名的一个目录。所以造成配置的localtions找不到com/hpm/piyin/mapper这样的目录。

将idea关掉直接进入工作空间手动创建目录,并且删除掉错误的目录:

springboot中invalid bound statement

重新启动:访问OK

springboot中invalid bound statement