首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >加载模式映射中的遗留Spring框架模式

加载模式映射中的遗留Spring框架模式
EN

Stack Overflow用户
提问于 2015-10-22 19:17:51
回答 1查看 80关注 0票数 0

在我正在审查的基于SpringFramework3.2的应用程序中,我注意到Spring的PluggableSchemaResolver在运行时生成一个映射,其中包括许多遗留的Spring模式。简写为清晰度:

代码语言:javascript
运行
复制
w.sf.o/s/ means www.springframwork.org/schemas/

代码语言:javascript
运行
复制
o/sf/    means org.springframework

以下是完整的清单:

代码语言:javascript
运行
复制
http://w.sf.o/s/aop/spring-aop-2.0.xsd o/sf/aop/config/spring-aop-2.0.xsd                                                                                                                                                                                                                                     
http://w.sf.o/s/aop/spring-aop-2.5.xsd o/sf/aop/config/spring-aop-2.5.xsd                                                                                                                                                                                                                                     
http://w.sf.o/s/aop/spring-aop-3.0.xsd o/sf/aop/config/spring-aop-3.0.xsd                                                                                                                                                                                                                                     
http://w.sf.o/s/aop/spring-aop-3.1.xsd o/sf/aop/config/spring-aop-3.1.xsd                                                                                                                                                                                                                                     
http://w.sf.o/s/aop/spring-aop-3.2.xsd o/sf/aop/config/spring-aop-3.2.xsd                                                                                                                                                                                                                                     
http://w.sf.o/s/aop/spring-aop.xsd o/sf/aop/config/spring-aop-3.2.xsd                                                                                                                                                                                                                                         
http://w.sf.o/s/beans/spring-beans-2.0.xsd o/sf/beans/factory/xml/spring-beans-2.0.xsd                                                                                                                                                                                                                        
http://w.sf.o/s/beans/spring-beans-2.5.xsd o/sf/beans/factory/xml/spring-beans-2.5.xsd                                                                                                                                                                                                                        
http://w.sf.o/s/beans/spring-beans-3.0.xsd o/sf/beans/factory/xml/spring-beans-3.0.xsd                                                                                                                                                                                                                        
http://w.sf.o/s/beans/spring-beans-3.1.xsd o/sf/beans/factory/xml/spring-beans-3.1.xsd                                                                                                                                                                                                                        
http://w.sf.o/s/beans/spring-beans-3.2.xsd o/sf/beans/factory/xml/spring-beans-3.2.xsd                                                                                                                                                                                                                        
http://w.sf.o/s/beans/spring-beans.xsd o/sf/beans/factory/xml/spring-beans-3.2.xsd                                                                                                                                                                                                                            
http://w.sf.o/s/cache/spring-cache-3.1.xsd o/sf/cache/config/spring-cache-3.1.xsd                                                                                                                                                                                                                             
http://w.sf.o/s/cache/spring-cache-3.2.xsd o/sf/cache/config/spring-cache-3.2.xsd                                                                                                                                                                                                                             
http://w.sf.o/s/cache/spring-cache.xsd o/sf/cache/config/spring-cache-3.2.xsd                                                                                                                                                                                                                                 
http://w.sf.o/s/context/spring-context-2.5.xsd o/sf/context/config/spring-context-2.5.xsd                                                                                                                                                                                                                     
http://w.sf.o/s/context/spring-context-3.0.xsd o/sf/context/config/spring-context-3.0.xsd                                                                                                                                                                                                                     
http://w.sf.o/s/context/spring-context-3.1.xsd o/sf/context/config/spring-context-3.1.xsd                                                                                                                                                                                                                     
http://w.sf.o/s/context/spring-context-3.2.xsd o/sf/context/config/spring-context-3.2.xsd                                                                                                                                                                                                                     
http://w.sf.o/s/context/spring-context.xsd o/sf/context/config/spring-context-3.2.xsd                                                                                                                                                                                                                         
http://w.sf.o/s/jdbc/spring-jdbc-3.0.xsd o/sf/jdbc/config/spring-jdbc-3.0.xsd                                                                                                                                                                                                                                 
http://w.sf.o/s/jdbc/spring-jdbc-3.1.xsd o/sf/jdbc/config/spring-jdbc-3.1.xsd                                                                                                                                                                                                                                 
http://w.sf.o/s/jdbc/spring-jdbc-3.2.xsd o/sf/jdbc/config/spring-jdbc-3.2.xsd
http://w.sf.o/s/jdbc/spring-jdbc.xsd o/sf/jdbc/config/spring-jdbc-3.2.xsd
http://w.sf.o/s/jee/spring-jee-2.0.xsd o/sf/ejb/config/spring-jee-2.0.xsd
http://w.sf.o/s/jee/spring-jee-2.5.xsd o/sf/ejb/config/spring-jee-2.5.xsd
http://w.sf.o/s/jee/spring-jee-3.0.xsd o/sf/ejb/config/spring-jee-3.0.xsd
http://w.sf.o/s/jee/spring-jee-3.1.xsd o/sf/ejb/config/spring-jee-3.1.xsd
http://w.sf.o/s/jee/spring-jee-3.2.xsd o/sf/ejb/config/spring-jee-3.2.xsd
http://w.sf.o/s/jee/spring-jee.xsd o/sf/ejb/config/spring-jee-3.2.xsd
http://w.sf.o/s/lang/spring-lang-2.0.xsd o/sf/scripting/config/spring-lang-2.0.xsd
http://w.sf.o/s/lang/spring-lang-2.5.xsd o/sf/scripting/config/spring-lang-2.5.xsd
http://w.sf.o/s/lang/spring-lang-3.0.xsd o/sf/scripting/config/spring-lang-3.0.xsd
http://w.sf.o/s/lang/spring-lang-3.1.xsd o/sf/scripting/config/spring-lang-3.1.xsd
http://w.sf.o/s/lang/spring-lang-3.2.xsd o/sf/scripting/config/spring-lang-3.2.xsd
http://w.sf.o/s/lang/spring-lang.xsd o/sf/scripting/config/spring-lang-3.2.xsd
http://w.sf.o/s/mvc/spring-mvc-3.0.xsd o/sf/web/servlet/config/spring-mvc-3.0.xsd
http://w.sf.o/s/mvc/spring-mvc-3.1.xsd o/sf/web/servlet/config/spring-mvc-3.1.xsd
http://w.sf.o/s/mvc/spring-mvc-3.2.xsd o/sf/web/servlet/config/spring-mvc-3.2.xsd
http://w.sf.o/s/mvc/spring-mvc.xsd o/sf/web/servlet/config/spring-mvc-3.2.xsd
http://w.sf.o/s/task/spring-task-3.0.xsd o/sf/scheduling/config/spring-task-3.0.xsd
http://w.sf.o/s/task/spring-task-3.1.xsd o/sf/scheduling/config/spring-task-3.1.xsd
http://w.sf.o/s/task/spring-task-3.2.xsd o/sf/scheduling/config/spring-task-3.2.xsd
http://w.sf.o/s/task/spring-task.xsd o/sf/scheduling/config/spring-task-3.2.xsd
http://w.sf.o/s/tool/spring-tool-2.0.xsd o/sf/beans/factory/xml/spring-tool-2.0.xsd
http://w.sf.o/s/tool/spring-tool-2.5.xsd o/sf/beans/factory/xml/spring-tool-2.5.xsd
http://w.sf.o/s/tool/spring-tool-3.0.xsd o/sf/beans/factory/xml/spring-tool-3.0.xsd
http://w.sf.o/s/tool/spring-tool-3.1.xsd o/sf/beans/factory/xml/spring-tool-3.1.xsd
http://w.sf.o/s/tool/spring-tool-3.2.xsd o/sf/beans/factory/xml/spring-tool-3.2.xsd
http://w.sf.o/s/tool/spring-tool.xsd o/sf/beans/factory/xml/spring-tool-3.2.xsd
http://w.sf.o/s/tx/spring-tx-2.0.xsd o/sf/transaction/config/spring-tx-2.0.xsd
http://w.sf.o/s/tx/spring-tx-2.5.xsd o/sf/transaction/config/spring-tx-2.5.xsd
http://w.sf.o/s/tx/spring-tx-3.0.xsd o/sf/transaction/config/spring-tx-3.0.xsd
http://w.sf.o/s/tx/spring-tx-3.1.xsd o/sf/transaction/config/spring-tx-3.1.xsd
http://w.sf.o/s/tx/spring-tx-3.2.xsd o/sf/transaction/config/spring-tx-3.2.xsd
http://w.sf.o/s/tx/spring-tx.xsd o/sf/transaction/config/spring-tx-3.2.xsd
http://w.sf.o/s/util/spring-util-2.0.xsd o/sf/beans/factory/xml/spring-util-2.0.xsd
http://w.sf.o/s/util/spring-util-2.5.xsd o/sf/beans/factory/xml/spring-util-2.5.xsd
http://w.sf.o/s/util/spring-util-3.0.xsd o/sf/beans/factory/xml/spring-util-3.0.xsd
http://w.sf.o/s/util/spring-util-3.1.xsd o/sf/beans/factory/xml/spring-util-3.1.xsd
http://w.sf.o/s/util/spring-util-3.2.xsd o/sf/beans/factory/xml/spring-util-3.2.xsd
http://w.sf.o/s/util/spring-util.xsd o/sf/beans/factory/xml/spring-util-3.2.xsd

只使用Spring3.2定义创建自己的spring.schemasspring.handlers文件并不会减少这个映射集。

Spring在运行时拥有遗留映射是正常的吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-22 19:17:51

是的,这很正常。每个Spring,例如spring-tx-3.2.14.RELEASE.jar,都包含一个META-INF/spring.schemas,它包含所有受支持的Spring版本的映射;在spring-tx-3.2.jar中,spring.schemas包含:

代码语言:javascript
运行
复制
http\://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd
http\://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd
http\://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd
http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd

只是在花时间思考之后分享,然后回顾源代码和生成的JAR来找到答案。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33288951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档