配置spring-dao.xml,spring-service.xml,spring-web.xml时报错
来源:2-6 逐层完成SSM的各项配置
慕慕6275161
2018-07-10
老师,我配置spring-dao.xml,spring-service.xml,spring-web.xml时报错。错误1:The errors below were detected when validating the file "spring-beans-4.3.xsd" via the file "spring-dao.xml". In most cases these errors can be detected by validating "spring-beans-4.3.xsd" directly. However it is possible that errors will only occur when spring-beans-4.3.xsd is validated in the context of spring-dao.xml. 错误2:The errors below were detected when validating the file "spring-beans-4.3.xsd" via the file "spring-service.xml". In most cases these errors can be detected by validating "spring-beans-4.3.xsd" directly. However it is possible that errors will only occur when spring-beans-4.3.xsd is validated in the context of spring-service.xml. 错误3:The errors below were detected when validating the file "spring-beans-3.2.xsd" via the file "spring-web.xml". In most cases these errors can be detected by validating "spring-beans-3.2.xsd" directly. However it is possible that errors will only occur when spring-beans-3.2.xsd is validated in the context of spring-web.xml.
1回答
-
同学好,感觉是你的schema有问题,请严格按照视频里面的spring-*.xml去配置,咱们视频里面是没用版本的
dao
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
service
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
web
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
012018-07-10
相似问题