正常来说这个问题可以通过下面方法分析
这个错误通常是由于文档中的 DOCTYPE 声明与根元素不匹配而引起的。这种情况下,可以通过以下几种方式来解决这个问题:
-
修改 DOCTYPE 声明,使其与文档根元素匹配。 例如,如果文档根元素是 <configuration>,则 DOCTYPE 声明应该是:
<!DOCTYPE configuration>
-
修改文档根元素,使其与 DOCTYPE 声明匹配。 例如,如果 DOCTYPE 声明是
<!DOCTYPE null>
,则文档根元素应该是:<null> -
如果您不确定要使用哪个 DOCTYPE 声明,可以尝试使用通用的 HTML5 DOCTYPE 声明,即
<!DOCTYPE html>
。
请注意,如果您正在使用 XML 文档,则 DOCTYPE 声明是可选的,并且不需要与根元素匹配。但是,在使用 HTML 文档时,必须使用正确的 DOCTYPE 声明,并且必须与文档根元素匹配。
但是我试了好几次都还是出现同样的错误
终于我发现了我的application.yml配置文件中有这样一个配置
mapper-locations: classpath:**/*.xml
这不就代表resources中所有的xml结尾的都会作为mybatis中的mapper.xml解析嘛
因此当我增加了logback.xml的时候,也会被认为时mapper的xml文件,因此就会报上面的错
所以改为
mapper-locations: classpath:**/mapper/*.xml
就好了
- quot SAXParseException configuration columnNumber lineNumberquot saxparseexception configuration columnnumber quot configuration sqlserver 39 quot environment configured top-level quot locale-collate configuration arguments quot user configure vscode quot configuration intellisense dependency socfpga_defconfig quot configuration内核 quot socfpga_deconfig configuration内核 configurationproperties注解quot configuration kubeadm quot configuration时报