标签:
疑问:
在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文件,具体位置是在相应的架包里,框架解析的时候,通过一定的机制定位到架包,找到该文件。具体怎么定位,不知!
标签:
原文地址:http://www.cnblogs.com/dazhuzhu/p/5656146.html