配置spring.web.xml/spring-service.xml/spring-dao.xml报错
来源:2-6 逐层完成SSM的各项配置
KaWhi_Lin
2018-03-13
你好,我用的是myeclipse,在配置ssm的时候按照教程流程走的,spring.xml的各个部分都出现了类似下面的问题,是因为本地找不到jar包吗?应该怎么解决呢
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
element 'context:component-scan'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/
schema/context/spring-context.xsd', because 1) could not find the document; 2) the document could
not be read; 3) the root element of the document is not <xsd:schema>.
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
element 'tx:annotation-driven'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/
schema/tx/spring-tx.xsd', because 1) could not find the document; 2) the document could not be
read; 3) the root element of the document is not <xsd:schema>.
Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for
element 'context:component-scan'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/
schema/context/spring-context.xsd', because 1) could not find the document; 2) the document could
not be read; 3) the root element of the document is not <xsd:schema>.
2回答
-
同学本地安装好maven和jdk8之后,需要与你的eclipse相关插件进行对接,
eclipse->偏好设置里,按照如下截图去配置,路径替换成自己的maven和jdk路径
配置完成之后,去到截图上面那个local repository的地址下把所有jar全部清空,之后右键项目选择的update maven project重新下载一次jar包即可,一般就没问题了,如果嫌下载速度慢,可以更换maven镜像,具体可以在网上找一下
012018-03-15 -
翔仔
2018-03-13
同学好,感觉是配置的问题,请对照下表头
<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">
022018-03-13
相似问题