为什么http://www.springframework.org/schema/rabbit/下没有文件spring-rabbit.xsd
why there is no file spring-rabbit.xsd under http://www.springframework.org/schema/rabbit/
为什么 http://www.springframework.org 保持统一的方式提供 spring-[schema].xsd 文件。
今天偶然发现URIhttp://www.springframework.org/schema/rabbit/. But, mostly other schemas have the xsd file named using spring- suffix with their name, i.e : spring-beans.xsd is under http://www.springframework.org/schema/beans/下没有名为spring-rabbit.xsd的文件。
所以,我对为什么会这样感到困惑和好奇?
这里是显示这种情况的图片。
我正在使用 eclipse 开发我的 spring 项目,我的一个 xml 配置文件中的 head 定义显示在底部:
<?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:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/rabbit
http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">
<rabbit:admin connection-factory="connectionFactory"/>
使用 http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
,我遇到了 eclipse XML 问题:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'rabbit:admin'. application-consumer.xml /my-spring-project/src/main/resources/config line 16 XML Problem
如果我使用 http://www.springframework.org/schema/rabbit/spring-rabbit-1.6.xsd
,则没有 XML 问题。
所以,这就是我感到困惑的原因,是否应该 http://www.springframework.org
提供 http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
就像它们在其他架构中所做的那样,例如 beans 、 data 、 context 等等。
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/beans/spring-data.xsd
http://www.springframework.org/schema/context/spring-context.xsd
没有必要 - spring 从 jar 映射到您正在使用的版本的适当模式(映射在 /META-INF/spring.schemas
中)。
完全没有用到网上的schema
编辑
link 现在就在那里。
为什么 http://www.springframework.org 保持统一的方式提供 spring-[schema].xsd 文件。
今天偶然发现URIhttp://www.springframework.org/schema/rabbit/. But, mostly other schemas have the xsd file named using spring- suffix with their name, i.e : spring-beans.xsd is under http://www.springframework.org/schema/beans/下没有名为spring-rabbit.xsd的文件。
所以,我对为什么会这样感到困惑和好奇?
这里是显示这种情况的图片。
我正在使用 eclipse 开发我的 spring 项目,我的一个 xml 配置文件中的 head 定义显示在底部:
<?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:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/rabbit
http://www.springframework.org/schema/rabbit/spring-rabbit.xsd">
<rabbit:admin connection-factory="connectionFactory"/>
使用 http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
,我遇到了 eclipse XML 问题:
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'rabbit:admin'. application-consumer.xml /my-spring-project/src/main/resources/config line 16 XML Problem
如果我使用 http://www.springframework.org/schema/rabbit/spring-rabbit-1.6.xsd
,则没有 XML 问题。
所以,这就是我感到困惑的原因,是否应该 http://www.springframework.org
提供 http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
就像它们在其他架构中所做的那样,例如 beans 、 data 、 context 等等。
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/beans/spring-data.xsd
http://www.springframework.org/schema/context/spring-context.xsd
没有必要 - spring 从 jar 映射到您正在使用的版本的适当模式(映射在 /META-INF/spring.schemas
中)。
完全没有用到网上的schema
编辑
link 现在就在那里。