今天在运行项目时报错:
Caused by: org.apache.xerces.impl.io.MalformedByteSequenceException: 3 字节 UTF-8 序列的字节 3 无效。
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:61)
... 33 more
经过多次百度调试后,发现将带中文的xml文件声明为GBK即可。
<?xml version="1.0" encoding="GBK" ?>