首页 > 代码库 > com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence报错解决方法

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence报错解决方法

添加了XML实体和表映射文件后,莫名报错,百思不得其解,也找不到哪里错了,后来把mybatis-config.xml文件中去掉中文注释就好了

 

mybatis-config.xml文件中的内容如下,去掉里面的<!-- 品牌 -->注释就好了

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration>       <settings>            <setting name="mapUnderscoreToCamelCase" value="true" />       </settings>            <typeAliases>         <!-- 品牌 -->         <typeAlias type="com.demo.goods.model.Brand" alias="brand" />             </typeAliases></configuration>  

 

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence报错解决方法