ssm整合遇到的第一个问题,谨记

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

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念