class path resource [mapper/*.xml] cannot be opened because it does not exist
在使用springboot整合mybatis遇到的问题 后面大致的意思是说*.xml不存在
·
项目场景:
在使用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
更多推荐
已为社区贡献1条内容
所有评论(0)