【发布时间】:2015-02-27 12:35:18
【问题描述】:
我正在尝试实现以下 xml 文件的 xmlns 定义的要点:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
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">
</beans>
我没有得到这里指定的 schemaLocation。例如,为什么我应该将xmlns:mvc = "http://www.springframework.org/schema/mvc" 和http://www.springframework.org/schema/mvc 添加到schemaLocation 属性以在我的spring 配置文件中使用mvc:xxx_something_xxx?
我只是想了解我每次开始创建spring-mvc应用程序时都在做什么,而不是在不了解的情况下从google复制粘贴它。
【问题讨论】:
标签: java xml spring spring-mvc