首页 > 其他 > 详细

xml 文件的schema引用

时间:2016-07-09 17:38:41      阅读:100      评论:0      收藏:0      [点我收藏+]

疑问:

在spring的xml文件的引用头里,包含许多schemaLocation引用,例如:

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:services="http://www.tesla.com/schema/services" xmlns:functions="http://www.tesla.com/schema/services/functions"
    xsi:schemaLocation="
           http://www.springframework.org/schema/beans            http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context          http://localhost:8080/schema/www.springframework.org/schema/context/spring-context.xsd
           http://www.tesla.com/schema/services                     http://localhost:8080/schema/services.xsd
           http://www.tesla.com/schema/services/functions         http://localhost:8080/schema/services-functions.xsd
       ">

 

http://localhost:8080/schema/services-functions.xsd 它就不是实际的引用位置。

 

经研究:该xsd文件,具体位置是在相应的架包里,框架解析的时候,通过一定的机制定位到架包,找到该文件。具体怎么定位,不知!

 

xml 文件的schema引用

原文:http://www.cnblogs.com/dazhuzhu/p/5656146.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!