springboot + mybatis-plus
Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
网上基本的说法是Mapper.xml文件编码问题,改utf-8-bom,还是utf-8什么的。但是我的配置文件检查了N次没问题。
其实是mybatis的路径配置问题引起的:
mybatis-plus:
mapper-locations: classpath:mapper
改成如下:
mybatis-plus:
mapper-locations: classpath:mapper/*Mapper.xml