Caused by: org.apache.ibatis.exceptions.PersistenceException:
Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
我把代码重新敲了一遍,证明不是老师的问题,就知道是版本的问题了,改错步骤如上图。好了好了,发际线保住了;我去听许嵩了。
方法二
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
出现这个错的根本原因,居然是Mapper.xml中存在中文注释,把filtering改为false,就可以了,上面的也行,但是我现在推荐这个