项目场景:

在使用springboot整合mybatis遇到的问题


问题描述

 后面大致的意思是说*.xml不存在


解决方案:

查看application.properties或者application.yml配置文件是否有关于mybatis的配置,如果存在则查看是否将mapper-locations写成config-location

注意:config-location是确定mybatis-config.xml文件位置的,而mapper-locations是用来注册你写的xxxmapper.xml文件。

  

mybatis:
  mapper-locations: classpath:mapper/*.xml


Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐