<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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.1.xsd">
(spring.3.1.1)
因為xml文檔都有格式,為了spring的配置文件增加的節點能滿足要求、合法,所以引入校驗該xml的格式文件。
xmlns是xml命名空間的意思,而xmlns:xsi是指xml所遵守的標簽規范。
1.xmlns:關於初始化bean的格式文件地址
2.xmlns:xsi:輔助初始化bean
3.xsi:context:關於spring上下文,包括加載資源文件
4.xsi:schemaLocation:用於聲明了目標名稱空間的模式文檔
