spring配置!新人求问applicationContext.xml扫描问题

这个逗b 2015-09-23 05:46:16
1:<context:component-scan base-package="org.xx" />

2:<util:properties id="dbParams" location="classpath:db.properties">
</util:properties>
Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-
context-3.2.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>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-
scan'.

这两段代码都报这个问题。是因为少jar包还是什么原因,求大神分析
...全文
218 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
这个逗b 2015-09-24
  • 打赏
  • 举报
回复
引用 楼主 zhe_noob 的回复:
1:<context:component-scan base-package="org.xx" /> 2:<util:properties id="dbParams" location="classpath:db.properties"> </util:properties> Multiple annotations found at this line: - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring- context-3.2.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>. - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component- scan'. 这两段代码都报这个问题。是因为少jar包还是什么原因,求大神分析
找不出来问题反正能用 不管了
解开者 2015-09-23
  • 打赏
  • 举报
回复
不能读取xsd,我没碰到过这种问题,看看是不是url拼错了,就是这一段http://www.springframework.org/schema/context/spring- context-3.2.xsd 实在不行就找个其他spring工程抄一份xsd的声明

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧