码迷,mamicode.com
首页 > 其他好文 > 详细

xml配置文件解释

时间:2018-10-12 13:44:53      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:mapping   Servle   handler   not   strong   com   lang   resource   resources   

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

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

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

<?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

xml配置文件解释

标签:mapping   Servle   handler   not   strong   com   lang   resource   resources   

原文地址:https://www.cnblogs.com/Alwaysbecoding/p/9777165.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!