其他分享
首页 > 其他分享> > ssm整合遇到的第一个问题,谨记

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

标签:xml,resource,spring,谨记,parsing,ssm,整合,path,org
来源: https://blog.csdn.net/lijiehao123456/article/details/120475592