zl程序教程

您现在的位置是:首页 >  工具

当前栏目

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

Apache序列字节IO com org 无效 utf
2023-09-11 14:19:52 时间

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [scheduling.xml]; nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

 

解决:解析xml时,有中文,此时把xml文件的头

<?xml version="1.0" encoding="UTF-8"?>

改成:

<?xml version="1.0" encoding="GBK"?>

即可!