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

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"?>

即可!

posted @ 2015-03-09 20:37  园芳宝贝  阅读(12479)  评论(1编辑  收藏  举报