org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring-dao.xml]
Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring-dao.xml]; nested exception is com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 1 字节的 UTF-8 序列的字节 1 无效。
错误原因
在xml中添加了中文注释
<!--1.扫描service下的包--> <contex:component-scan base-package="com.jie.service"/>
解决办法;
把xml中的UTF-8改为UTF8
<?xml version="1.0" encoding="UTF8"?>
参考连接:https://blog.csdn.net/qq_45800640/article/details/116853891