XML 指可扩展标记语言(EXtensible Markup Language)

xmlns:是指XML命名空间 ( XML Namespace )

XSD是指XML结构定义 ( XML Schemas Definition ) XML Schema 是DTD的替代品。XML Schema语言也就是XSD。

下面xml文件中下划线标注的是每个命名空间的唯一标识名,比如xmlns:xsi表示xsi命名空间,xmlns后面没有命名空间名称的,表示默认的命名空间

 

<?xml version="1.0" encoding="UTF-8"?>
<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.xsd">
    <context:component-scan base-package="xxx.xxx.controller" />
     
    <context:annotation-config/>
    <mvc:default-servlet-handler/>
    <mvc:annotation-driven/>
     
    <mvc:resources mapping="/images/**" location="/images/" />
     
    <bean id="xxx" class="xxx.xxx.xxx.Xxx">
        <property name="xxx" value="xxxx"/>
    </bean>
</beans>
schemaLocation是xmlns:xsi里面的属性。

 

 

https://www.cnblogs.com/zhao1949/p/5652167.html

 

 

-----------------------------------------------------------------------------

 

相关文章:

  • 2021-06-02
  • 2022-02-11
  • 2021-06-09
  • 2018-08-15
  • 2021-10-04
  • 2022-01-18
  • 2021-05-29
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2021-08-13
  • 2021-05-20
  • 2021-12-12
  • 2021-10-03
相关资源
相似解决方案