SpringBoot 启动时,报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ddl.dealcars.mapper.UserMapper.update

报错图示:

 

 报错原因:UserMapper.xml 没有在配置文件中配置,SpringBoot 找不到

解决:

application.yml 中添加下述配置:

mybatis:
mapper-locations: classpath:mapper/*.xml #扫描所有 mybatis 的 xml 文件

  

 

posted @ 2022-02-04 21:56  快走中的擦边球  阅读(44)  评论(0编辑  收藏  举报